Display sort indicator (Up & Down Triangle) in datagrid column header

Does anyone know how to add sort indicator (up & down triangle glyph) in datagrid column header   I'm using C#.  Please help, thanks in advance.


Answer this question

Display sort indicator (Up & Down Triangle) in datagrid column header

  • Simone1

    I tried before, but I cannot get the current header cell from the Paint event handler, so not able to add an image to it. All I can get is the row number and the column number of the current cell, do you have any idea how to get the current datagrid cell

  • SN Ngaihte

    You might try handling Paint event on the grid and drawing these indicators as needed.



  • Display sort indicator (Up & Down Triangle) in datagrid column header