Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select multiple rows dynamically for Ext.selection.CheckboxModel grid extjs

Tags:

grid

extjs

I am unable to select multiple rows dynamically for grid having Ext.selection.CheckboxModel.

I have indexes for the rows which I want to select. What is happening is after select call.

for(var i=0;i<count;i++){
Ext.getCmp('loadFrameStateInfoTable').getSelectionModel().select(oldStateSelection[i].index);
}

I got the selection in grid but for only one row. That's the row which index is coming last from oldStateSelection[i].index.

The grid should have all rows selected.

like image 535
Ankit Avatar asked Jul 03 '26 17:07

Ankit


1 Answers

As you can see in the docs, you need to set keepExisting if you don't want the other lines deselected.

select(oldStateSelection[i].index, true);
like image 110
AndreKR Avatar answered Jul 07 '26 05:07

AndreKR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!