HashTable

Discussion in 'ASP .Net' started by =?Utf-8?B?dmluYXk=?=, May 23, 2005.

  1. I am getting the data in a HashTable.

    Q ..

    Can i bind Hashtable to Datagrid ??

    If not..
    To which object the HashTable should be converted so i can bind it to
    DataGrid ??

    Thanks
    --
    http://pathidotnet.blogspot.com
    =====
    vInAypAtHi
    o__
    ---_,>/'_------
    (_) \(_)
    ---------------
    =?Utf-8?B?dmluYXk=?=, May 23, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?dmluYXk=?=

    Karl Seguin Guest

    Yes, you can bind it.

    Why not just try?

    Two values will be exposed, the "Key" and the "Value"

    DataBinder.Eval(Container.DataItem, "Key")


    karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
    http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    come!)


    "vinay" <> wrote in message
    news:...
    >I am getting the data in a HashTable.
    >
    > Q ..
    >
    > Can i bind Hashtable to Datagrid ??
    >
    > If not..
    > To which object the HashTable should be converted so i can bind it to
    > DataGrid ??
    >
    > Thanks
    > --
    > http://pathidotnet.blogspot.com
    > =====
    > vInAypAtHi
    > o__
    > ---_,>/'_------
    > (_) \(_)
    > ---------------
    Karl Seguin, May 23, 2005
    #2
    1. Advertising

  3. Karl
    Is there a way to Sort HashTable??

    Thanks
    --
    http://pathidotnet.blogspot.com
    =====
    vInAypAtHi
    o__
    ---_,>/'_------
    (_) \(_)
    ---------------


    "Karl Seguin" wrote:

    > Yes, you can bind it.
    >
    > Why not just try?
    >
    > Two values will be exposed, the "Key" and the "Value"
    >
    > DataBinder.Eval(Container.DataItem, "Key")
    >
    >
    > karl
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
    > http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    > come!)
    >
    >
    > "vinay" <> wrote in message
    > news:...
    > >I am getting the data in a HashTable.
    > >
    > > Q ..
    > >
    > > Can i bind Hashtable to Datagrid ??
    > >
    > > If not..
    > > To which object the HashTable should be converted so i can bind it to
    > > DataGrid ??
    > >
    > > Thanks
    > > --
    > > http://pathidotnet.blogspot.com
    > > =====
    > > vInAypAtHi
    > > o__
    > > ---_,>/'_------
    > > (_) \(_)
    > > ---------------

    >
    >
    >
    =?Utf-8?B?dmluYXk=?=, May 23, 2005
    #3
  4. =?Utf-8?B?dmluYXk=?=

    Karl Seguin Guest

    No.
    You can either use a SortedList (which'll sort on the key), create your own
    datatable, or put the keys in an array and use Array.Sort()


    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
    http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    come!)


    "vinay" <> wrote in message
    news:...
    > Karl
    > Is there a way to Sort HashTable??
    >
    > Thanks
    > --
    > http://pathidotnet.blogspot.com
    > =====
    > vInAypAtHi
    > o__
    > ---_,>/'_------
    > (_) \(_)
    > ---------------
    >
    >
    > "Karl Seguin" wrote:
    >
    >> Yes, you can bind it.
    >>
    >> Why not just try?
    >>
    >> Two values will be exposed, the "Key" and the "Value"
    >>
    >> DataBinder.Eval(Container.DataItem, "Key")
    >>
    >>
    >> karl
    >>
    >> --
    >> MY ASP.Net tutorials
    >> http://www.openmymind.net/ - New and Improved (yes, the popup is
    >> annoying)
    >> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    >> come!)
    >>
    >>
    >> "vinay" <> wrote in message
    >> news:...
    >> >I am getting the data in a HashTable.
    >> >
    >> > Q ..
    >> >
    >> > Can i bind Hashtable to Datagrid ??
    >> >
    >> > If not..
    >> > To which object the HashTable should be converted so i can bind it to
    >> > DataGrid ??
    >> >
    >> > Thanks
    >> > --
    >> > http://pathidotnet.blogspot.com
    >> > =====
    >> > vInAypAtHi
    >> > o__
    >> > ---_,>/'_------
    >> > (_) \(_)
    >> > ---------------

    >>
    >>
    >>
    Karl Seguin, May 24, 2005
    #4
    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. Guillermo

    Problem with hashTable

    Guillermo, Mar 4, 2004, in forum: Perl
    Replies:
    1
    Views:
    598
    Gunnar Hjalmarsson
    Mar 4, 2004
  2. Jonathan Wolfson

    vbc compilation fails when using Hashtable

    Jonathan Wolfson, Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    536
    Tu-Thach
    Jun 27, 2003
  3. John E

    Get Hashtable Object Directly

    John E, Oct 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,308
    Nicholas Paldino [.NET/C# MVP]
    Oct 8, 2003
  4. diya

    Type Hashtable not defined

    diya, Oct 31, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,749
    Nicole Calinoiu
    Oct 31, 2003
  5. D. Shane Fowlkes

    ArrayList versus HashTable

    D. Shane Fowlkes, Feb 12, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    17,762
    Kevin Spencer
    Feb 12, 2004
Loading...

Share This Page