Datagrid doesn't appear

Discussion in 'ASP .Net Datagrid Control' started by Dave, Aug 20, 2005.

  1. Dave

    Dave Guest

    I'm fairly new to this .NET stuff. I've got two related database tables. The
    child table is just a set of textual selections for one of the columns in the
    parent table - in Access it's a drop-down selector list. So, nothing too
    clever.

    I've set up the data connection, two data adapters and a dataset, created
    the relation and filled the dataset exactly as described in
    http://msdn.microsoft.com/library/d...atingmultiplerelatedtablesinadonetdataset.asp.

    Then I put a datagrid onto my form as described in
    http://msdn.microsoft.com/library/d...ry/en-us/vbcon/html/vbcondatagridoverview.asp
    and set the datasource and datamember properties.

    But when I run the page the datagrid does not appear at all, the page is
    just blank.

    Can anyone hazard a guess as to what I may have done wrong?
    --
    Dave
    Dave, Aug 20, 2005
    #1
    1. Advertising

  2. Dave

    Sachin Saki Guest

    Hi,

    Check whether Datatables are populated with data or not. thats the reason i
    think your datatables are not populating correctly.

    Regards
    Sachin Saki
    ..NET Developer - Capgemini, INDIA

    "Dave" wrote:

    > I'm fairly new to this .NET stuff. I've got two related database tables. The
    > child table is just a set of textual selections for one of the columns in the
    > parent table - in Access it's a drop-down selector list. So, nothing too
    > clever.
    >
    > I've set up the data connection, two data adapters and a dataset, created
    > the relation and filled the dataset exactly as described in
    > http://msdn.microsoft.com/library/d...atingmultiplerelatedtablesinadonetdataset.asp.
    >
    > Then I put a datagrid onto my form as described in
    > http://msdn.microsoft.com/library/d...ry/en-us/vbcon/html/vbcondatagridoverview.asp
    > and set the datasource and datamember properties.
    >
    > But when I run the page the datagrid does not appear at all, the page is
    > just blank.
    >
    > Can anyone hazard a guess as to what I may have done wrong?
    > --
    > Dave
    Sachin Saki, Aug 22, 2005
    #2
    1. Advertising

  3. Dave

    Dave Guest

    Thanks Sachin, but it wasn't that. I found the problem - I didn't realise I
    had to call DataBind() in the code.
    --
    Dave


    "Sachin Saki" wrote:

    > Hi,
    >
    > Check whether Datatables are populated with data or not. thats the reason i
    > think your datatables are not populating correctly.
    >
    > Regards
    > Sachin Saki
    > .NET Developer - Capgemini, INDIA
    >
    > "Dave" wrote:
    >
    > > I'm fairly new to this .NET stuff. I've got two related database tables. The
    > > child table is just a set of textual selections for one of the columns in the
    > > parent table - in Access it's a drop-down selector list. So, nothing too
    > > clever.
    > >
    > > I've set up the data connection, two data adapters and a dataset, created
    > > the relation and filled the dataset exactly as described in
    > > http://msdn.microsoft.com/library/d...atingmultiplerelatedtablesinadonetdataset.asp.
    > >
    > > Then I put a datagrid onto my form as described in
    > > http://msdn.microsoft.com/library/d...ry/en-us/vbcon/html/vbcondatagridoverview.asp
    > > and set the datasource and datamember properties.
    > >
    > > But when I run the page the datagrid does not appear at all, the page is
    > > just blank.
    > >
    > > Can anyone hazard a guess as to what I may have done wrong?
    > > --
    > > Dave
    Dave, Aug 22, 2005
    #3
  4. Dave

    Ger Eielts Guest

    Thanks.... I had the same problem... now I know and never forget to call
    datagrid.databind()

    regards, Ger.
    Ger Eielts, Sep 5, 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. William F. Robertson, Jr.

    Re: Page_Load event doesn't appear in the trace

    William F. Robertson, Jr., Jun 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    882
    William F. Robertson, Jr.
    Jun 25, 2003
  2. Marina
    Replies:
    0
    Views:
    526
    Marina
    Jul 21, 2003
  3. Elliot M. Rodriguez
    Replies:
    0
    Views:
    598
    Elliot M. Rodriguez
    Jul 21, 2003
  4. Jorge_Beteta
    Replies:
    0
    Views:
    443
    Jorge_Beteta
    Feb 3, 2004
  5. Michael Appelmans

    Datagrid doesn't appear in web page

    Michael Appelmans, Jun 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    106
    Michael Appelmans
    Jun 4, 2004
Loading...

Share This Page