ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Maxedy on February 22, 2014, 12:25:43 pm

Title: Remove option
Post by: Maxedy on February 22, 2014, 12:25:43 pm
Thanks admin,
one more help needed from you i just want to remove Option from obj.  Is there any method for that
like  $grid.pqGrid("option", "colModel").remove();

Thanks
Title: Re: Remove option
Post by: paramvir on February 23, 2014, 10:50:26 am
There are getters and setters for the options. We don't remove them but we set them to appropriate values depending upon requirement and type of option.

For example if we want to remove row grouping our code would be

Code: [Select]
$grid.pqGrid( "option" , "groupModel", null ); //setter
 $grid.pqGrid( "refreshDataAndView" );

and if we want to add one more field to existing row grouping, our code would be

Code: [Select]
var GM = $grid.pqGrid( "option" , "groupModel");//getter
 GM.dataIndx.push( dataIndx );
 GM.dir.push( "up" );
 $grid.pqGrid( "option" , "groupModel", GM);//setter