views:

155

answers:

1

If i have DataGrid which looks like:

Col 1   Col 2
------- -------
1       a
2       b
3       c
...     ...
n       n

Can the order be reversed easily without sorting? So that n is first, and 1 is last. I have custom sort implemented from this article, but sorting the same column twice in a row calls sorting function twice (which is slow), so just reversing the order should be faster and have the same effect.

A: 

If You want reverse data before binding (and You have possibilities to access to data) may You use Reverse method in codebehind ? I don't know what is source of Your data so I can't help more :/

netmajor
My code is very similar to the one from the article i mentioned, just the columns are different. Example of how to change code from that article would be more than enough.
irf1x
too much problematic example like for me ;/
netmajor