Author Topic: Dynamic colModel & nested grid problem  (Read 2816 times)

Autoflow

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 21
    • View Profile
Dynamic colModel & nested grid problem
« 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 :-)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Dynamic colModel & nested grid problem
« Reply #1 on: April 21, 2019, 03:58:32 pm »
Could you please share a jsfiddle to check it.

Autoflow

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Dynamic colModel & nested grid problem
« Reply #2 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 ..