Author Topic: colModel of detailModel  (Read 2320 times)

interloper10

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 14
    • View Profile
colModel of detailModel
« on: February 09, 2016, 11:53:30 pm »
Is is possible to change the column model of detailModel (for new detailModel views). 

My (nested) detailModel's colModel is the same as my main grid colModel (one column model definition used for both).  I would like to show/hide my detailModel colModel based on columns show/hidden in the main grid.

On the toolbar show/hide column change listener, I have:
...
   }, listener: { 'change': function (evt) {
        ...
        //get the detailModel
        var detailModel = $grid.pqGrid( "option", "detailModel" );
        //get the colModel of my detailModel
        var detailModelcolModel = detailModel( "option", "colModel" );


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: colModel of detailModel
« Reply #1 on: February 10, 2016, 04:27:32 pm »
yes that's possible for new detail views.

colModel of detailModel can be directly obtained from gridDetailModel in the context of this demo: http://paramquery.com/pro/demos/nesting

Code: [Select]
  var detailModelcolModel = gridDetailModel.colModel;
  //iterate over the columns and manipulate them..