C
Chris Mayers
Hi,
I'm trying to sort a DataGrid (dotNet Windows Forms).
Trouble is, the column I'm trying to sort on contains part numbers of the
form
xxx-yyy where
xxx - Part Type
yyy - Part Size.
The DataGrid sorts into a sequence somthing like:
10-199
10-299
103-10
103-20
10-399
wheras I would like:
10-199
10-299
10-399
103-10
103-20
It seems that it ignores the '-' when sorting (trying to be helpful??).
Anyone got any ideas how I can get the DataGrid to sort using exactly what
is in the column rather than applying any other 'rules' to it.
If I replace the '-' s with '~'s then it sorts fine, but that is not really
a solution.
Look forward to hearing any suggestions.
(I haven't included any details on the code or the data source as they don't
seem to make any difference, but if anyone things it is relevent, I'm happy
to supply them.)
Thanks,
Chris.
PS Apologies if the post appears more than once, but I originally tried to
post it via dotNET247 and after 3 hours it still isn't here...
I'm trying to sort a DataGrid (dotNet Windows Forms).
Trouble is, the column I'm trying to sort on contains part numbers of the
form
xxx-yyy where
xxx - Part Type
yyy - Part Size.
The DataGrid sorts into a sequence somthing like:
10-199
10-299
103-10
103-20
10-399
wheras I would like:
10-199
10-299
10-399
103-10
103-20
It seems that it ignores the '-' when sorting (trying to be helpful??).
Anyone got any ideas how I can get the DataGrid to sort using exactly what
is in the column rather than applying any other 'rules' to it.
If I replace the '-' s with '~'s then it sorts fine, but that is not really
a solution.
Look forward to hearing any suggestions.
(I haven't included any details on the code or the data source as they don't
seem to make any difference, but if anyone things it is relevent, I'm happy
to supply them.)
Thanks,
Chris.
PS Apologies if the post appears more than once, but I originally tried to
post it via dotNET247 and after 3 hours it still isn't here...