datatable-sort

  • Thread starter Thread starter reiks
  • Start date Start date
R

reiks

I have a datatable . My requirement is to sort the table
rows in ascending and descending order basing on the
columns which I give it.

I've used the following expression

ds.Tables[0].DefaultView.Sort="au_fname";

but it's sorting in ascending order but not in descending.

How to specify the descending order.

also let me know how can I include multiple columns in my
above expression
 
Hi,

Sure - both.
Just put in as many columns+sorting order you want.
Example

....Sort = "Column1 ASC, Column2 DESC, ...";
 
Back
Top