Sort a datagrid without the help of SQL server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there a way to sort a datagrid without the help of SQL server? I usually
use ADO.Net to get a dataset from SQL sever then bind it to datagrid. Now I
am asked to make datagrid support sorting, of course I can change my SQL
statements by adding order by clause for sorting purposes. But I would like
to know if there are other options.

TIA
 
Surely there is a simple way. Using DataView will overcome this issue.
DataTable's View property will give a valid DataView. DataView's Sort
expression works similar to SQL. It accepts an order by string. Simply you
can write "PKID ASC, UserID DESC, ActionDate ASC".
 
Ýt is my opinion there is a simple way. You can Use DataView
DataTable's View property will give a valid DataView. DataView's Sort
Simply you
can write " ASC or DESC".
 
Ýt is my opinion there is a simple way. You can Use DataView
DataTable's View property will give a valid DataView. DataView's Sort
Simply you
can write " ASC or DESC".

Yener Türkeli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top