jQWidgets Forums

jQuery UI Widgets Forums Grid TypeError: b.bounddata.subGroups is undefined jqxgrid.grouping.js

This topic contains 1 reply, has 2 voices, and was last updated by  admin 5 years, 3 months ago.

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

  • dacracot
    Participant

    I’m trying to reactively render a grid with grouping and getting the error…

    TypeError: b.bounddata.subGroups is undefined jqxgrid.grouping.js:8:31878
        _rendergroup http://localhost:8080/pooka/lib/jqwidgets-ver9.0.0/jqxgrid.grouping.js:8

    My grid code is as such…

    var SCL = {
        // ------------------------------------------
        showReferences : function(row){
            SCL.selectedSubsystemId = row.subsystem_id;
            $("#scl-reference-grid").jqxGrid("updatebounddata");
            },
        // ------------------------------------------
        referenceInitialize : function(){
            $("#scl-reference-tabs").tabs();
            // --------------------------------------
            var toxReferenceURL = "http://localhost:8080/tox/nepsbx1.scl.gridReference?outputXform=http://localhost:8080/pooka/xslt/tox2data.xsl&in_subsystem_id=";
            // --------------------------------------
            var dataReferenceColumns = [
                { name: "mod_id", type: "string" },
                { name: "reference_id", type: "number" },
                { name: "group", type: "string" },
                { name: "name", type: "string" },
                { name: "pages", type: "string" },
                { name: "author", type: "string" },
                { name: "pub_date", type: "string" },
                { name: "revisions", type: "string" },
                { name: "comment_text", type: "string" }
                ];
            // ------------------------------------------
            var tableReferenceColumns = [
                { text: "Grouping", align: "left", dataField: "group", width: 80 },
                { text: "REF-ID", align: "left", dataField: "mod_id", width: 200 },
                { text: "Reference", align: "left", dataField: "name", width: 350 },
                { text: "Author", align: "left", dataField: "author", width: 200 },
                { text: "Published", align: "left", dataField: "pub_date", width: 200 },
                { text: "Revisions", align: "left", dataField: "revisions", width: 200 },
                { text: "Applicable Pages", align: "left", dataField: "pages", width: 200 }
                ];
            // --------------------------------------
            var dataReferenceDefinition =
                {
                dataType: "json",
                dataFields: dataReferenceColumns,
                timeout: 10000,
                root: "SCL",
                url: toxReferenceURL+SCL.selectedSubsystemId,
                id: "reference_id"
                };
            // --------------------------------------
            var dataAdapter = new $.jqx.dataAdapter(dataReferenceDefinition, {
                beforeSend: function(xhr,settings){
                    settings.url = toxReferenceURL+SCL.selectedSubsystemId;
                    },
                downloadComplete: function(data,status,xhr){
                    if (xhr.status != 200)
                        console.error("SCL.referenceInitialize >> " + xhr.status + " " + xhr.statusText + " for " + toxReferenceURL+SCL.selectedSubsystemId);
                    }
                });
            // --------------------------------------
            $("#scl-reference-grid").jqxGrid({
                source: dataAdapter,
                filterable: true,
                filterMode: 'simple',
                sortable: true,
                groupable: true,
                altRows: true,
                columnsResize: true,
                columns: tableReferenceColumns,
                groups: ['group'],
                groupsexpandedbydefault: true,
                ready: function(){
                    console.log("scl-reference-grid ready");
                    }
                });
            // --------------------------------------
            // --------------------------------------
            }
        // ------------------------------------------
        }

    And the data is properly retrieved when SCL.showReferences is called…

    {
        "SCL": [
            {"author": "", "comment_text": "Associated by David on 04/07/2020-11:00:09", "group": "spaaaaa", "mod_id": "REF-50364", "name": "Bonky_Niblic", "pages": "", "pub_date": "23-MAR-20", "reference_id": "50364", "revisions": "" },
            {"author": "", "comment_text": "Associated by David on 04/07/2020-11:00:09", "group": "spaaaaa", "mod_id": "REF-50365", "name": "Payara 557", "pages": "", "pub_date": "", "reference_id": "50365", "revisions": "" },
            {"author": "", "comment_text": "Associated by Karen on 01/02/2018-13:53:59", "group": "tag 3", "mod_id": "REF-50305", "name": "Test_Ref_Dropzone", "pages": "", "pub_date": "", "reference_id": "50305", "revisions": "" },
            {"author": "", "comment_text": "Associated by Karen on 01/02/2018-13:53:59", "group": "Undefined", "mod_id": "REF-50308", "name": "1524-Test", "pages": "", "pub_date": "", "reference_id": "50308", "revisions": "" },
            {"author": "", "comment_text": "Associated by Karen on 01/02/2018-13:53:59", "group": "tag 3", "mod_id": "REF-50313", "name": "LICENSE", "pages": "", "pub_date": "", "reference_id": "50313", "revisions": "" },
            {"author": "", "comment_text": "Associated by Karen on 01/03/2018-12:00:25", "group": "johnny 1", "mod_id": "REF-50310", "name": "Life Module", "pages": "", "pub_date": "", "reference_id": "50310", "revisions": "" },
            {"author": "", "comment_text": "Testing some more", "group": "tag 1", "mod_id": "REF-99", "name": "REF-99 is the name", "pages": "33", "pub_date": "", "reference_id": "99", "revisions": "" },
            {"author": "", "comment_text": "Associated by Kevin on 08/29/2016-14:04:57", "group": "tag 1", "mod_id": "REF-3119", "name": "REF-3119 is the name", "pages": "", "pub_date": "", "reference_id": "3119", "revisions": "" },
            {"author": "", "comment_text": "Uploaded and associated by David on 04/11/2018-15:22:14", "group": "Undefined", "mod_id": "REF-50328", "name": "solrOraLink", "pages": "", "pub_date": "", "reference_id": "50328", "revisions": "" },
            {"author": "", "comment_text": "Uploaded and associated by David on 04/16/2018-10:51:06", "group": "Undefined", "mod_id": "REF-50329", "name": "SQL", "pages": "", "pub_date": "", "reference_id": "50329", "revisions": "" },
            {"author": "", "comment_text": "Uploaded and associated by David on 04/16/2018-10:53:07", "group": "Undefined", "mod_id": "REF-50330", "name": "crashReport", "pages": "", "pub_date": "", "reference_id": "50330", "revisions": "" }
        ]
    }

    To what is the bounddata.subGroups referring? How do I set it?


    admin
    Keymaster

    Hi dacracot,

    “group” is a keyword in the grouping. Have you tried with different?

    Regards,
    Peter

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

You must be logged in to reply to this topic.