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

datasource with 2 tables

HI

I have a gridview with a dataset as a datasource. This dataset contains two
different tables.
Will the gridview display both tables in the gridview or only from the 1st
table? If this is so how can I put both datatables in the gridview?

ch

Bert
Jan 4 '07 #1
1 1066
Bert,

A gridview will always display only one table, the one specified in the
DataMember property. You need to join two tables into one to show them in a
gridview.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bert" <be****@gmail.comwrote in message
news:uM*************@TK2MSFTNGP02.phx.gbl...
HI

I have a gridview with a dataset as a datasource. This dataset contains
two different tables.
Will the gridview display both tables in the gridview or only from the 1st
table? If this is so how can I put both datatables in the gridview?

ch

Bert

Jan 4 '07 #2

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

Similar topics

3
by: Tamir Khason | last post by:
Why this does not work??? cb1 - combobox DataProvider.DataProvider.DS_BringRacks() - DataSet cb1.DataSource=DataProvider.DataProvider.DS_BringRacks().Tables; cb1.DisplayMember = "id"; ...
3
by: Alexander | last post by:
Hi, I am using a DataGrid and assign a DataTable as a DataSource to it: void ShowData() { DataTable myNewDataTable = new DataTable(); ... // fill table this.m_DataGrid1.DataSource =...
2
by: Paul | last post by:
Hi I have a datasource with 1 table, 100 rows, 1 column. I'm trying to populate the drowndown list with the contents of the datasource, dd_phys.DataSource =...
1
by: Ed Chiu | last post by:
Hi, Is there a way to clone datasource of one datagrid to another? I tried: DataGrid2.datasource = DataGrid1.datasource DataGrid2.Databind() Does not seem to work
1
by: Ariel Gimenez | last post by:
Hi i want to know how to do this: i have a combobox in my app that is allready binded to a datatable and has it properties valuemember and displaymember now i want at runtime to assign to it...
2
by: Will Chamberlain | last post by:
I am currently converting some VB.NET web apps to C#. It has been pretty seamless so far but have currently run into some problems that I can't resolve. The line that generates the error is: The...
4
by: Greg P | last post by:
If i connect to my database and select all tables and views. Then I drag a few differnt tables onto differnt tabs on the same form. I know that the data isn't bound until the tab header is...
0
by: Abbas82 | last post by:
Hi, I am working on a GridView control to play a game. I am trying to make the cells editable; however, when I click on edit I lost my data or I get an error: Object reference not set to an...
2
by: nospam | last post by:
I have code that is working in one place but not another. In one spot, you click a button to open an XML file and have it read into a dataset. I then set the datasource of my datagrid to the...
9
pod
by: pod | last post by:
Hello I have a form which contains several textboxes and comboboxes I am able to loop through all the controls on this form and set the value (ctl.Text) to the Textboxes but if I try to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.