Results 1 to 9 of 9

Thread: datagrid

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    datagrid

    I already add a DataGrid on my WebForm, and already also connected it.. But when the WebForm is loaded, I can't see the DataGrid?? what the problem with this?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Show.
    Some.
    Code.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441
    DataGrid1.DataSource = DataSet11.Table1

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Touché.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441
    what that mean?? I have a OleDbDataAdapter and I already connected the database.. DataGrid1.DataSource=Dataset11.Table1 doesn't work

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Touché as in... I said "show some code" and you showed just "some" code.

    What I meant was, show all the relevant code.

    VB Code:
    1. DataGrid1.DataSource = DataSet11.Table1

    Might have to be

    VB Code:
    1. DataGrid1.DataSource = DataSet11.Tables(0)

  7. #7
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    ok if you have the dataadapter and sqlstring you still need to do the followwing.

    VB Code:
    1. Dim dsOne As New System.data.DataSet
    2. da.Fill(dsOne, "dtOne")
    3. dgOne.DataSource = DsOne.Tables("dtOne")
    4. dgOne.DataBind()

  8. #8
    New Member
    Join Date
    Sep 2004
    Posts
    9
    Fill databse into SqlDataAdapter
    Code:
    SqlDataAdapter1.Fill (DataSet11,"tblTest")
    Then Bind database into Datagrid

    Datagrid1.DataSource=DataSet11
    Datagrid1.Bind()

    Have fun

  9. #9
    Lively Member VB_client's Avatar
    Join Date
    Feb 2004
    Location
    India
    Posts
    87

    hi

    I think the datagrid receives no records from the database table (or) from the stored procedure you used to return the dataset.

    you can try with Response.Write(DataGrid.Items.Count);

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