Reputation: 1228
I have an EditorGridPanel with a CheckboxSelectionModel. In the Ext.data.Source binded to this grid, I have a boolean value saying if the Checkbox of the rows should be checked by default or now.
How can I have a list that appears by default with the default Checkbox values correctly set, this based on the data value ?
Thanks in advance,
CB
Upvotes: 1
Views: 4649
Reputation: 12966
Assuming you meant Ext.data.Store, you can do it by passing a filtered version of the store as the first parameter to CheckboxSelectionModel.selectRecords, preferably in the EditorGridPanel's show event:
panel.addListener('show', function() {
this.getSelectionModel().selectRecords(this.getStore().filter('isset', 'true'));
});
Upvotes: 1