storm_buster
storm_buster

Reputation: 7568

dojox.grid.EnhancedGrid, how does it work?

I have a few questions about dojox.grid.EnhancedGrid:

  1. How to get rowindexes of the selected row?
  2. How to remove a row by its rowIndex?
  3. 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!

Upvotes: 0

Views: 545

Answers (1)

storm_buster
storm_buster

Reputation: 7568

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

Upvotes: 1

Related Questions