I want to do multiple column sorting in Gridview using C#. Suppose if we have sort column A of table in desc order then after i need to sort column B then i want the order of column A will not be changed, it remains the same.
| A | B |
| 1 | 2 |
| 2 | 1 |
if i sort Col A in descending order then result will be
| A | B |
| 2 | 2 |
| 1 | 1 |
but when i sort col B in ascending order i want the result like
| A | B |
| 2 | 1 |
| 1 | 2 |
if you can see col A remains the same after col B sorting. Thanks
Regards
Nitin Yadav
Sandeep Singh ShekhawatPosted Nov 7, 2012, 1:31 AM
http://www.codeproject.com/Articles/14437/Extending-GridView-by-allowing-Multiple-Selections
http://dotnetslackers.com/articles/gridview/SortingaGridviewwithmultipleColumns.aspx
http://aspalliance.com/666_Extending_the_GridViews_Sorting_Capabilities.all