Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > datagrid columns from different datatables help ?

Reply
Thread Tools

datagrid columns from different datatables help ?

 
 
strongmace
Guest
Posts: n/a
 
      07-06-2004
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 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.


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      07-06-2004
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" <> wrote in message
news:40eab143$...
> 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 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.
>
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com



 
Reply With Quote
 
 
 
 
strongmace
Guest
Posts: n/a
 
      07-06-2004
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?


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding different columns to a datagrid from different tables in the database nmsreddi ASP .Net Web Controls 1 06-09-2006 09:03 AM
Advantages of using custom collections over datatables to bind to a datagrid? John Dalberg ASP .Net 4 12-08-2005 07:39 PM
How to show in a datagrid columns of different datatables? Luis Esteban Valencia ASP .Net 7 09-29-2004 02:59 AM
Columns and Inherited Datagrid...Active Schema does not support columns rob thomson ASP .Net Datagrid Control 0 09-04-2003 03:09 PM
set up a datagrid of multiples datatables in 1 dataset Richard Loupatty ASP .Net 2 07-18-2003 08:54 PM



Advertisments
 



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