How to sort a datagrid binded to an HashTable?

Discussion in 'ASP .Net' started by Pedro Rosas Silva, May 5, 2008.

  1. 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
    Pedro Rosas Silva, May 5, 2008
    #1
    1. Advertising

  2. Pedro Rosas Silva

    ADN Guest

    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.
    ADN, May 5, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mira Vizjak

    Binded DropDown list

    Mira Vizjak, Jul 15, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    440
    Anatoly
    Jul 16, 2003
  2. Amar

    How Determine Binded Column

    Amar, Feb 25, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    281
  3. Hunter Hou
    Replies:
    8
    Views:
    1,140
    AlesD
    Aug 10, 2004
  4. ton
    Replies:
    2
    Views:
    199
    Alvin Bruney [MVP]
    Feb 11, 2004
  5. Navin
    Replies:
    1
    Views:
    668
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page