How to sort a datagrid binded to an HashTable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pedro Rosas Silva

    How to sort a datagrid binded to an HashTable?

    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
  • ADN

    #2
    Re: How to sort a datagrid binded to an HashTable?

    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.

    Comment

    Working...