ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: Autoflow on April 13, 2019, 04:15:28 pm

Title: Dynamic colModel & nested grid problem
Post by: Autoflow on April 13, 2019, 04:15:28 pm
Hi ParamQuery,

there is following situation:

When loading data + colModel from server and generation the pqGrid like this:

 .. dataModel: {
                    location: 'remote',
                    recIndx: "ID",
                    dataType: "JSON",
                    url: "... ",
                    getData: function (dataJSON, textStatus, jqXHR) {

                        // Add a nested column
                        dataJSON.columns.unshift(
                            { title: "Nested data ",width:100, type: "detail", resizable: false, editable: false,
                                menuInHide: true, menuUI: {tabs:['hideCols']}
                            });
                        // Generation of former column fails not showing the arrow indicator ..
                        this.refreshCM(dataJSON.columns);
                        return {data: dataJSON.rows};
                    }
                }

the arrow indicator of nested grids is not shown.

I tried several possibilities and every time colModel + nested data is loaded by "pqGrid.refreshCM(dataJSON.columns);" the nested grid arrow is not rendered ..

A solution would be great :-)
Title: Re: Dynamic colModel & nested grid problem
Post by: paramvir on April 21, 2019, 03:58:32 pm
Could you please share a jsfiddle to check it.
Title: Re: Dynamic colModel & nested grid problem
Post by: Autoflow on April 30, 2019, 04:28:51 pm
Hi.
Just found out that your documentation states that nested grids and dynamic colModel(s) are not compatible.
Thats no problem. As a possible solution i can prefetch the colModel from server ..