I have three columns in grid, name, division and terminal. What I
want is that when I click on name header then I want the grid to sort
by name, but when I click on division then it should sort by division,
and then name. This way, all the poeple in each division will be
sorted in alphabatical order. How do I achieve this? I am on VS2003.
Thanks
Eliyahu Goldin - 02 Sep 2007 08:55 GMT
You can specify both columns in the SortExpression property and override
DataGrid.OnSortCommand method. If only one column name is passed in the Sort
Expression property of the event argument, call the default event handler.
If two columns are passed, implement your own sorting. You may re-populate
the datasource with a modified sql or use a DataView that allows specifying
multiple columns for sorting.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
>I have three columns in grid, name, division and terminal. What I
> want is that when I click on name header then I want the grid to sort
[quoted text clipped - 3 lines]
>
> Thanks