PDA

View Full Version : [CLOSED] Filtering grid on multiple checked values



PriceRightHTML5team
Aug 02, 2013, 8:42 AM
Hi,

I am using gridpanel(MainGrid).
MainGrid columns having image in column headers and on click of that image one window will open which
contains childgrid panel.the unique values from maingrid column are given to the store of childgrid.
Childgrid contains checkboxselectionmodel.On click of single checkbox I am able to filter Maingrid records using code shown below:-

6677
Refer attachment.



<script>
App.MainGrid.getStore().filterBy(function (record) {

if (record.data.UserName === checkedComponents) {
return true;
}
return false;
}
</script>



where 'checkedComponents' means checkedrecords from childgrid.

But I want to filter MainGrid with multiple Checked values which is not achievable with above code and I am not getting the exact way of doing it.

Please suggest me the way or sample of code for this issue.


Thanks.

Daniil
Aug 02, 2013, 1:58 PM
Hi @PriceRightHTML5team,

I am not sure what exactly you are asking. How to get selection? If so, then:

grid.getSelectionModel().getSelection();


It returns an array of selected rows.