ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Balaji 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.
-
It can be done by toggling detailModel.init callback.
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();
}
}
]
},