473,396 Members | 1,804 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,396 software developers and data experts.

2 tables in one DataGrid

MRW
Hello!

I'm looking for an easy way to take 2 tables with different, but
similar, structures and combining them into one DataGrid, with a
hyperlink on each record to send you to a page depending on what table
it's from.

Is there an easy way to at least merge the two tables into one to
display the DataGrid?

Thanks for any help!

Oh yes... I'm using VB

Mar 22 '06 #1
2 1208
Are you talking about DataTable objects, if so you could add the two
DataTables to a DataSet and then join them using a relationship. You could
then create the hyperlinks and send the user wherever you want by using
TemplateFields and the <%# bind("somefield") %> syntax.
"MRW" wrote:
Hello!

I'm looking for an easy way to take 2 tables with different, but
similar, structures and combining them into one DataGrid, with a
hyperlink on each record to send you to a page depending on what table
it's from.

Is there an easy way to at least merge the two tables into one to
display the DataGrid?

Thanks for any help!

Oh yes... I'm using VB

Mar 22 '06 #2
Use the SQL UNION Keyword to combine the two tables into one SELECT
statement

Mar 22 '06 #3

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

Similar topics

0
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...
4
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...
1
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...
2
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...
3
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,...
1
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...
8
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...
3
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...
2
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...
3
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? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.