Dharmendra Kumar

Dharmendra Kumar

  • NA
  • 29
  • 4.3k

Sorting order of the elemetns

Apr 8 2014 3:38 PM
Hi All,

I will be highly obliged if you could solve my issue.

The issue which I am facing that is about the sorting order of the Special Chars, Numbers and Alphbets.

I think default sorting is Special Chars -> Numbers -> Alphbets in Ascending order. Suppose I have below data

if we sort the above data in c# in ascending order then we will get the following result


But as per my requirement , I want the sorting to be Numbers -> Special Chars ->Alphabets

The above result should come as


And these results I am displaying in the DataGrid, So I want to change the way of default sorting of the grid so that the above result can be achieved.

Answers (3)