Need to order a datatable
by partial condition. Have a datatable
in this way:
[0]: P01,10,01;
[1]: P01,10,02;
...
[n]: P03,10,01;
...
[m]: P03,10,02;
What I need to do is ordering the datatable
by a partial portion of data; Example: When first row is odd it must be in descending order, while a pair must by in ascending.
The value returned must look like:
[0]: P02,10,01;
[1]: P02,10,02;
...
[n]: P03,10,03;
...
[m]: P03,10,02;
I know that a sort in datatable
and default dataview can do that.
How can I sort this data in a datatable
?