Results 1 to 2 of 2

Thread: [2005] Data Grid View problem

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    257

    [2005] Data Grid View problem

    I can't get my datagridview control on my form (named dgv) to actually display a dataset that I know is not empty. I know I'm forgetting something stupid but I skimmed through the list of methods and properties of the datagridview control and I didn't see anything too familiar. Here's my current code:

    Code:
            Dim ds As New DataSet()
            ds.ReadXml(txtPathA.Text)
            MessageBox.Show(ds.Tables(0).Rows(0).Item(0))
            dgv.DataSource = ds
    And the messagebox does in fact show what's in the first table's first row in the first column but dgv is still totally blank and has a rowcount of 0 and everything after it all executed. I know with like list boxes and stuff if you bind it to a datasource, you have to set the display member or something but I don't remember what I'm forgetting for the dgv!

    EDIT: well I just realized it can display one single table at a time but I couldda sworn I saw a DGV at some point display multiple tables at a time so what's up with that?
    Last edited by Desolator144; Dec 9th, 2007 at 07:56 PM.
    I tried to end process on Visual Studio 2005
    but PETA stopped me saying it's smart enough
    to be a living creature

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