views:

698

answers:

1

Hi,

I have a datagridview like this one:

         | foo | bar | baz | ...
------------------------------------------
Name 1   | asd | dsa | sad | ...
Name 2   | ...
Name 3   | ...
...      | ...

Name X is in RowHeaderCell and I want to sort this datagridview by name, how can I do that? datagridveiw.Sort() wors only for columns and not row headers...

thanks!

J.

+1  A: 

There is no built-in way to do this. You would need to respond to the row header clicked event and in that event handler implement the code you need to sort.

Scott Dorman