mardi 6 août 2019

How to bind data in selModel checkbox

I am not able to bind the selModel checkbox with data that is coming from the backend. I have put eh attribute dataIndex in the selModel, I can see 'myApp.model.gridModel.SELECTED' coming in JSON as 'true', but my checkboxes are not selected. My grid code is as follows:

Ext.apply(this, { store: myStore(), hasAddButton: false, cls: this.cls + ' open-item-list', selModel: { selType: 'checkboxmodel', injectCheckbox: 2, checkOnly: true, ignoreRightMouseSelection: true, ***dataIndex: myApp.model.gridModel.SELECTED,*** listeners: { selectionchange: 'onItemsSelectionChange' } }, scrollable: true, header: false, columns: [{ text: 'Name', dataIndex: 'name' }, { text: 'Email', dataIndex: 'email', flex: 1 }] });

Can someone help with this pls?




Aucun commentaire:

Enregistrer un commentaire