jQWidgets Forums

jQuery UI Widgets Forums Angular jqxgrid grouping. Problem after migrate to jqwidgets for angular 8

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 5 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • MrX
    Participant

    Hello!
    I have error in jqxgrid with grouping params, after migrate to jqwidgets for Angular 8
    current version packages
    “jqwidgets-ng”: “^8.3.0”,
    “jqwidgets-scripts”: “^8.2.0”,

    ERROR:
    core.js:6014 ERROR ReferenceError: obj is not defined
    at c.<computed>._setbatchgroupstate (jqxgrid.grouping.js:8)
    at c.<computed>.collapseallgroups (jqxgrid.grouping.js:8)
    at c.<computed>._render (jqxgrid.js:8)
    at c.<computed>.refreshgroups (jqxgrid.grouping.js:8)
    at c.<computed>.addgroup (jqxgrid.grouping.js:8)
    at Object.push../node_modules/jqwidgets-ng/jqwidgets/jqxcore.js.b.jqx.invoke (jqxcore.js:15)
    at Object.push../node_modules/jqwidgets-ng/jqwidgets/jqxcore.js.b.jqx.jqxWidgetProxy (jqxcore.js:15)
    at HTMLDivElement.<anonymous> (jqxcore.js:15)
    at Function.each (jqxcore.js:8)
    at init.each (jqxcore.js:8)

    I see this error after add subscribe to the event onBindingcomplete:

    @ViewChild(“dataGrid”, { static: true }) dataGrid: jqxGridComponent;
    ngAfterViewInit(): void {
    this.dataGrid.onBindingcomplete.subscribe(() => {
    this.dataGrid.groupable(true);
    this.dataGrid.addgroup(“deadLineGroupName”);
    });
    }

    I also get this error every time I drag a column into the grouping area.

    But! If I add grouping params in template…

    <jqxGrid #dataGrid [width]=”‘100%'” [height]=”‘100%'”
    [source]=”source” [columns]=”tableSource.columns” [columnsresize]=”true” [sortable]=”true”
    [autoshowfiltericon]=”true” [enabletooltips]=”true” [selectionmode]=”selectMode” [filterable]=”true”
    [columnsreorder]=”true” [groupable]=”true” [groups]=”[‘deadLineGroupName’]”>
    </jqxGrid>

    then grid displays “no data”, but my grid has data without [groupable]=”true” [groups]=”[‘deadLineGroupName’]” params
    What am I doing wrong? Or current version packages has this problem?


    admin
    Keymaster

    Hi MrX,

    Are you sure that you use jqwidgets-scripts 8.2.0 and not a previous version? Could you share a stackblitz sample which demonstrates the behavior that you point out?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com


    MrX
    Participant

    The problem was related to migration Angular to version 8.
    To fix the problem, it was enough for me to replace the value in ts.config.json
    “target”: “es2015”
    TO
    “target”: “es5”


    Peter Stoev
    Keymaster

    Hi MrX,

    We tested the behavior with the additional information. Thank you very much for the feedback!
    The jqwidgets-ng package is updated with the fix about datagrid grouping behavior. You should be able to build with es2015 target.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.