Get column name by index in SlickGrid

This code

slickgrid.onDblClick.subscribe(function(e){ var cell = slickgrid.getCellFromEvent(e); console.log(cell.row, cell.cell); }); 

prints 0, 0 if I double-clicked the first row, in the first column, etc.

But since the order of the columns can change at any given time, I need to get its name using its index.

How to do it?

+8
slickgrid
source share
1 answer

Just get a link to the current column array:

 grid.getColumns()[cell.cell] 
+16
source share

All Articles