473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

datagrid columns from different datatables help ?

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.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #1
2 1243
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" <st********@yahoo-dot-com.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
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.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 18 '05 #2
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
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stephan Steiner | last post by:
Hi I'm using several DataTables in my program which are updated periodically. At the same I have those tables bound to DataGrids in my GUI. So far I've been doing all the processing in the same...
3
by: Kevin | last post by:
Hi Al I want to add two combobox columns in my datagrid. the one combobox column must be bound to the same datasource that the datagrid is, and the other combobox I just want to populate with a...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
1
by: strongmace | last post by:
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...
7
by: Luis Esteban Valencia | last post by:
I have this i need to show the datagrid with columns of 2 datatables Dim myadap As New SqlDataAdapter myconn.Open() myadap.TableMappings().Add("Table", "vistaUsuarios")
5
by: Genojoe | last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
4
by: Mortar | last post by:
i need a datagrid with 2 header columns. The top one might have 1 column spanning 5 columns of the header row below it. what is the best way to do this? Could i have 2 datatables...1 filling the...
4
by: Rich | last post by:
Hello, I have a one datagrid that will be based on different datatables. One datatable may have 7 columns, another 15... With the tables that have more columns, I have been manually dragging...
2
by: Thomas Beyerlein | last post by:
Is it possible to have different columns of a datagrid bound to different datatables? I am working on a project and the specks have suddenly changed. Now a item can have multiple reports/...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.