Datagrid doesn't appear

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Datagrid doesn't appear

    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
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchnavigatingmultiplerelatedtablesinadonetdatase t.asp[/url].

    Then I put a datagrid onto my form as described in
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbcondatagridoverview.asp[/url]
    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 Guest

  2. Similar Questions and Discussions

    1. How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the datagrid Update event.
      How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the...
    2. UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
      I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of...
    3. custom usercontrol inside of datagrid - loses its state/viewstate on re-bind/postback of the datagrid
      I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of...
    4. problema ultima pagina datagrid asp.net/problem last page datagrid
      ciao, ho un problema. ho un datagrid in una pagina asp.net con le impostazioni di PAGING abilitate. Uso l'impostazione NUMERIC PAGE. Il problema è...
    5. To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible?
      Hello, I am searching the whole Internet for a good example how to edit/update a DataGrid in a DataGrid (nested DataGrid). I know how to...
  3. #2

    Default RE: Datagrid doesn't appear

    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
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchnavigatingmultiplerelatedtablesinadonetdatase t.asp[/url].
    >
    > Then I put a datagrid onto my form as described in
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbcondatagridoverview.asp[/url]
    > 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 Guest

  4. #3

    Default RE: Datagrid doesn't appear

    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
    > > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchnavigatingmultiplerelatedtablesinadonetdatase t.asp[/url].
    > >
    > > Then I put a datagrid onto my form as described in
    > > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbcondatagridoverview.asp[/url]
    > > 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 Guest

  5. #4

    Default RE: Datagrid doesn't appear

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

    regards, Ger.
    Ger Eielts Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139