Datagrid doesn't appear

D

Dave

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?
 
S

Sachin Saki

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
 
D

Dave

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

Ger Eielts

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

regards, Ger.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top