3.2.0

How do I get the current selected column

Just like grid.getCurrentRow() returns the current row what is the equivalent for the column that the user clicks on, in the header of the grid?
AY
January 12,
The available selection models do not allow selecting the whole column by clicking on the grid header.

With the single cell or multi-cell selection you can retrieve the current column with getCurrentColumn() method.
Alex (ActiveWidgets)
January 13,
getCurrentColumn() always returns 0 for any column selected.
AY
January 13,
Which selection mode are you using? How do you select the column?
Alex (ActiveWidgets)
January 13,
I would like to single click on the header and get the column I clicked on. The reason why I need this is so that I can send the column to be sorted on back to the server to retrieve the entire dataset from the server. So everytime the user clicks on a column on any page, the user will be returned to the first page and will retrieve the entire dataset in the sorted order from the server.

If I rely on the grid to sort when I click on a column in the header, it sorts only the current page based on the column that is clicked. So, if I move beween pages the data is no longer sorted on that column.
AY
January 13,
>>in the header of the grid
For column headers you can use onHeaderClicked function
January 13,
Thanks. The onHeaderClicked works fine.
AY
January 14,

This topic is archived.

See also:


Back to support forum