CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    346

    binding Hashtable data in DataGridView?

    I want to present a Hshtable data in a DataGridView table.
    How do i do that ?

    i tried the following , but nothing happens is presented :


    Hashtable ht = new Hashtable();

    ht.Add(1, 5);

    ht.Add(2, 3);




    dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

    dataGridView1.AutoGenerateColumns = true;

    dataGridView1.DataSource = ht;


    please help...

  2. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: binding Hashtable data in DataGridView?

    put it in a datatable instead
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured