473,654 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 tables in the same datagrid

1 New Member
I want to see 2 tables in the same datagrid -
the odd columns will show table 1
the even columns will show table 2
Please help me
Oct 14 '09 #1
1 1613
GaryTexmo
1,501 Recognized Expert Top Contributor
I would suggest copying the columns you want to display into a new DataTable, formatting it how you want. I don't think there's any automatic way to do what you want.
Oct 14 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
288
by: David Perez Essenwanger | last post by:
Hi. i have this code and i would like to know how to populate a DataGrid in order to display each 3 rows the following information: row 1: Name1 row 2: Description1 row 3: Another DataGrid with Name1 details row 4: Name2 row 5: Description2 row 6: Another DataGrid with Name2 details
4
1183
by: Patrick | last post by:
I have a Windows Forms DataGrid bound to a Table within a DataSet. The Table is related to others within the DataSet. The DataGrid allows the user to surf through related tables. I don't want that behavior; I want the DataGrid to just show the one table. How is this accomplished? I tried using this...
1
18242
by: Brian | last post by:
I have a dataset containing 2 tables. I need to fill a datagrid using data from both of these. If I could create a SQL Statement to fill the datagrid, it would look like this: SELECT fields.fieldname, fieldvalues.value FROM fields, fieldvalues I am having trouble finding documentation explaining how to populate
2
8875
by: Bennett Haselton | last post by:
I know how to create a DataAdapter that loads data from a data source into a table in a typed DataSet, and how to set the DataSource and DataMember properties of a DataGrid so that at run time it will load the data from that table in the DataSet. Assuming I've got two tables in the DataSet, how can I set the DataSource property of the DataGrid to be an inner join of the two tables in the DataSet? If I want the DataGrid to get data...
3
2988
by: Maverick | last post by:
Assume i have 2 tables stored in a single dataSet (ds) and the relationship is well added ds.Tables("product") ds.Tables("descriptors") what I want to do is show the data from 2 of the tables, linked by the relationship, on the SAME DataGrid juz like the data is select by "Join" but i cannot find the correct code to do this. I am looking for something like:
1
908
by: Tom | last post by:
Forgive the newbie question but any help would be appreciated. I built a simple form and want to place a datagrid on it that would be based on two tables. I created the sqlconnetion and two sqladapters. Each has a table based on it. I created the dataset with the two tables. But I can't seem to bind a datagrid control to the dataset and get the results to display. Am I missing a concept here. I have looked at a lot of material about this...
8
10389
by: Jason L James | last post by:
Hi all, does anyone know if I can create a dataview from multiple datatables. My dataset is constructed from four separate tables and then the relationships are added that link the tables together. To make data entry easier I would like to combine selected columns from the four tables onto a single dataview that could be used as the datasource for a datagrid control. The distinct updates, insert ans delete
3
3418
by: Bob | last post by:
I have a dataset with two tables. To make it simple, assume they are: Table_1 with EmployeeID, Name, and ReportsTo fields Table_2 with ManagerID and Name fields A data relation is set up between Table_1.ReportsTo and Table_2.ManagerID In a dataGrid I would like to display the following columns Table_1.EmployeeID,Table_1.name, and Table_2.Name Can this be done? If so, how?
2
1753
by: yuanh23 | last post by:
Hi, I have 3 talbes "customers","orders","details". i wanna to use 3 datagrids to show those tables. and when the selected row in parent talbe changes, the selected row in child table changes automaticly. If there is only 2 tables, that's quite easy. add the relation "CusVsOrder" to dataset. binding the "patient" with the parent datagrid, binding the relation "customers.CusVsOrder" with the child datagrid. while, now there are 3 tables,...
3
1601
by: Jose | last post by:
I have a datagrid with 3 columns. I have 2 tables. the question is. ¿How obtain or show in my datagrid the column1 and column2 of my fields the my table1 and de column3 a field of my table2? Thanks a lot.
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8596
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.