datagrid columns from different datatables help ?

S

strongmace

Hi. I'm rather new to vs.net so explaining things in detail would be
of great help to me. I'm working on a WebForms Project.

Basically I have a datagrid I need to populate. I have it set up so
that it will connect to my database (did not use the wizard btw) and
I can make it display things. However I've run into a problem.

I have 8 columns I need to populate but each one is from a different
table. The auto populate at runtime does not do what I need it to do.
Given any 8 tables (table1 through table 8) located in Database1, how
would I set up my 8 columns and populate each one from a different
table? In addition, how would I populate them with conditions, i.e.
fill this table with values only when in the january through june
months.

Thank you.
 
M

Marina

Your query needs to have a join between all tables involved and select the
appropriate column from each table. This is really more of a SQL issue,
then anything to do with .NET.

strongmace said:
Hi. I'm rather new to vs.net so explaining things in detail would be
of great help to me. I'm working on a WebForms Project.

Basically I have a datagrid I need to populate. I have it set up so
that it will connect to my database (did not use the wizard btw) and
I can make it display things. However I've run into a problem.

I have 8 columns I need to populate but each one is from a different
table. The auto populate at runtime does not do what I need it to do.
Given any 8 tables (table1 through table 8) located in Database1, how
would I set up my 8 columns and populate each one from a different
table? In addition, how would I populate them with conditions, i.e.
fill this table with values only when in the january through june
months.

Thank you.
 
S

strongmace

If I remember right though, a join requires that the tables have some
sort of matching element. These tables have nothing in common and I
cannot edit them or reorganize them so that they do, which is dont
think a join would work (although I could be wrong). Is there some
way to set up a column manually and linke it directly to a specific
table?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top