grid filter checkbox checked values

hi,



in DhtmlX grid i have a column as master checkbox on grid header,











When user check/ un check all the rows in grid are checked /unchecked.



But my question is when user search using filter and click on header check / un check irrespective of search result all the rows in the grid are checked, how to prevent that.




Hello,


which approach do you use to organize loop through all rows in grid ?


In case of following approach - only visible rows will be taken into consederation:


for(var i=0;i<grid.getRowsNum();i++){
grid.cells2(i,column_index).setValue(state))
}





right now i am doing this



for
(var i=0; i<mygrid.getRowsNum(); i++)



SearchGrid.render_row(i);



before changing the checkbox state in the grid.



 



what you are saying when user search and then choose checkbox i shouldnt do the above process and need to do as below process ?



for(var i=0;i<grid.getRowsNum();i++){
  grid.cells2(i,column_index).setValue(state))
}



Yes,


if you want to check only visible rows using your checkState() function, you should use the approach that was recommended in the previous answer:


for(var i=0;i<grid.getRowsNum();i++){
grid.cells2(i,column_index).setValue(state))
}



thanks for your clarification