Author Topic: Remove option  (Read 2695 times)

Maxedy

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
Remove option
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Remove option
« Reply #1 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