Author Topic: Only One Nested Grid in open state.  (Read 2630 times)

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
Only One Nested Grid in open state.
« on: June 16, 2015, 07:45:22 am »
Hi ,

Is there is any way to close already opened or expanded nested grids at once , I need to have only one nested grid open at once. Please help me!.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Only One Nested Grid in open state.
« Reply #1 on: June 16, 2015, 12:22:20 pm »
There are rowExpand() and rowCollapse() methods to individually expand and collapse details of a row.

If you want to collapse all details at once, please use the code below:

Code: [Select]
var data = $gridMain.pqGrid('option',"dataModel").data;
for(var i=0;i<data.length;i++){
var rowData = data[i];
if(rowData.pq_detail){
rowData.pq_detail.show = false;
}
}
$gridMain.pqGrid("refresh");

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Only One Nested Grid in open state.
« Reply #2 on: June 16, 2015, 12:48:37 pm »
woww...thank you for the support.