sort DataGridViewLinkColumn

I just discovered that the DataGridViewLinkColumns are not sortable, is there a way to get them to be The property bound to the Text of the column is also the link text, so in expected it to be sortable as a DataGridViewTextBoxColumn.

Alternatively I could use a TextBox column and handle the ContentClick event, but I did not manage to achieve the HoverUndlerline effect with this kind of column. I tried by handling MouseEnter and MouseLeave of a Cell and setting the Style.Font, but this style then applies to all cells at the same time, so not only the hovered cell has underlined text.

Does anyone has a suggestion how to fix one of these approaches Or any other idea how to get a sortable link column with HoverUnderline effect



Answer this question

sort DataGridViewLinkColumn

  • Newbie71

    Why do I find the solution always 2 minutes after posting a question....

    For anybody how did overlook this, too:

    Set the SortMode in the Column to Automatic....


  • sort DataGridViewLinkColumn