How to sort a datagrid binded to an HashTable?

  • Thread starter Thread starter Pedro Rosas Silva
  • Start date Start date
P

Pedro Rosas Silva

Hi all,

I have a datagrid in an ASP.Net 1.1 web application which is binded to
an HashTable.
The grid has several columns and I want to sort the results by one of
those columns.
Are you aware of any way to do it?

Usually, I perform these sorts by changing the SQL queries behind the
datagrid.
But now I have an HashTable, so I cannot sort the results of the
HashTable.
Please advice.
Thanks.

Best Regards,
Pedro Rosas Silva
 
You could convert your Hashtable to a DataTable via a collection
object or something (not sure if you can do a direct cast), and then
use DataViews to sort your data to display it to the user.
 
Back
Top