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

"Test1","12234","23","@abc","@123"
if we sort the above data in c# in ascending order then we will get the following result

"@123","@abc","12234","23","test1"

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

The above result should come as

"12234","23","@123","@abc","test1"



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)