mintuhouse
mintuhouse

Reputation: 469

Dojo EnhancedGrid: How to get the index of selected column?

If I click on the column header of dojo enhancedgrid, the whole column is selected. I want to know the column index of such selected column.

Thanks for help in advance.

Upvotes: 0

Views: 1542

Answers (1)

jfernandez_04
jfernandez_04

Reputation: 152

this way:

dojo.connect(grid,"onRowClick",function(event){
 var items = grid.selection.getSelected();
     dojo.forEach(items, function(selectedItem) {
            if (selectedItem !== null) {
                var id = grid.store.getValues(selectedItem, 'ID');
                     #whatever you want to do...
            }
     });

});

Upvotes: 1

Related Questions