dhtmlxgrid, howto display sortable column icon

Hi,



is there a way to make column headers display some icon that indicates that this column is actually sortable?

The reason is that for a normal user it is not clear that a column is sortable as long as he/she doesn’t ever click on a header.

So it would be nice to be able to display an icon in the header, that shows this column is sortable, but not sorted yet.



regards

There is no built-in support for such functionality , technically you can add any kind of custom HTML as part of column header , so you can inject any kind of custom icon in header as well ( which can be later hidden from onAfterSorting event )

In the examples I could not find anything where custom HTML is placed in the header.
Do you have an example or could you give me at least an idea of how to actually add
"any kind of custom HTML as part of column header"?

Just place it in setHeader command as

grid.setHeader(“A , B”)

or in case of init from XML




<column … ><![CDATA[ A ]]>



dhtmlx.com/docs/products/dhtmlxG … art_hdrftr

Just place it in setHeader command as

grid.setHeader(“A , B”)

or in case of init from XML




<column … ><![CDATA[ A ]]>



dhtmlx.com/docs/products/dhtmlxG … art_hdrftr