Datatable is Sorted (Urgent)
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Dear all, I need to know given a datatable wether it is sorted or not. I need this to reverse the sorting (i.e. if it is sorted Asc make it Desc and vise verca) Thank u alot. Rania Adel
When you populate it use
ORDER BY column ASC
then store a boolean value with the datatable, e.g.bool isSortedAsc = true;
Then, if you need to flip the order you will know which order it is currently in by the Boolean flag. ColinMackay.net Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?