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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datasets and datagrid 1

Status
Not open for further replies.

DotNetBlocks

Programmer
Apr 29, 2004
161
US
Is it possible to bind a dataset with multiple tables to datagrid and bind controls to diffent tables within the dataset? I am using vs 2003.
 
Sure.

Try doing this

myGrid.DataSource = Dataset1.Tables(0)
myGrid.DataBind()

Then

mylabel.text = Dataset1.Tables(1).Rows(0).Item("Whatever").ToString
 
Everything is enclosed in the data grid. lets say i have some labels that need to be filled from table 1 and a dropdown menu to befilled on the same datagriditem with table 2
 
Yes you can do that. Just set the databinding properties of each control in the properties window. Then all you have to do is call one bind on the datagrid, and all controls within the datagrid will be bound also.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top