Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataviewgrid control - can I show several tables from dataset?

Status
Not open for further replies.

subgoat

Programmer
Sep 23, 2005
39
0
0
GB
Hi,

In my winForms VB.Net application I'm binding the datagridview datasource property to a table in my dataset. That's great for showing one table, but I want to show more than one at a time - even though they are completely different 'shapes'. Is that possible? How would I do that?

Any pointers / advice much appreciated ¦;¬)

 
Assuming you are using SQLxxxx, create a View in SQL that has the correct data as you wish it displayed. Add the View to your dataset in the VB app as any other table. Then use the View as the datatsource for the datagridview.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Hi,

I am trying to populate a data grid with multiple tables from an Access db using oledb.

I want users to be able to type a postcode in a text box and the address results should be displayed on the data grid along with client details from another table.

Do I need to use the parameter property of the oledbcommand class to get round this?

Any help would be much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top