Sorting a datagrid URGENT!!!

  • Thread starter Thread starter Chris Calhoun
  • Start date Start date
C

Chris Calhoun

Does anyone know how to sort a datagrid from client side code?

Thanks in advance!
 
Chris,

If you want to sort a datagrid, then you will have to sort the data
source that the grid is displaying. If you set the source of the DataGrid
to a DataTable, it uses the DataView exposed by the DefaultView property on
the DataTable class. You can set the Sort property on this DataView and the
grid that is attached to it will be sorted accordingly.

Hope this helps.
 
Hi Chris,

There is no way to sort a datagrid in the client, you will have to refresh
tha page doing a round trip to the server.

Cheers,
 
That's not true at all. Sorting a datagrid client side is very doable. I
agree that it is probably not the norm and probably not worth the effort but
still, it can be done.
 
Back
Top