dojox.grid.EnhancedGrid, how does it work?
-
08-10-2019 - |
سؤال
I have a few questions about dojox.grid.EnhancedGrid:
- How to get rowindexes of the selected row?
- How to remove a row by its rowIndex?
- How do I check if a row is selected or not?
I have tried removeSelectedRows()
and rowRemoved(inRowIndex)
, but I couldn't make them work; my cpu usage started growing!
المحلول
1&2 :
var items = lstNotes.selection.getSelected();
if (items.length) {
dojo.forEach(items, function(selectedItem) {
if (selectedItem !== null) {
notesStore.deleteItem(selectedItem);
}
});
}
3: dijit.byId('grid').selection.selected[rowIndex] // returns true or fals
لا تنتمي إلى StackOverflow