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
 
A string containing the column name followed by "ASC"
(ascending) or "DESC" (descending). Columns are sorted
asending by default. Multiple columns can be separated by
commas.
ds.Tables[0].DefaultView.Sort="au_fname DESC";

Bin Song, MCP
 
Back
Top