Author Topic: detail Model turning on / off at run time  (Read 1857 times)

Balaji

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
detail Model turning on / off at run time
« on: November 29, 2016, 03:49:29 pm »
Hi,

I need to turn on or off detail model of the grid dynamically at run time. Is there any way to do this.

Thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: detail Model turning on / off at run time
« Reply #1 on: November 29, 2016, 09:52:21 pm »
It can be done by toggling detailModel.init callback.

Code: [Select]
toolbar: {
items: [
{
type:'button',
label: 'Remove detailModel',
listener: function(){
this.option('detailModel.init', null);
var ci = this.getColIndx({dataIndx:'pq_detail'});
if(ci >= 0){
var CM = this.option('colModel');
CM.splice(ci, 1);
this.option('colModel', CM );
}
this.refreshView();
}
}
]
},