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

Get Values from Datagrid-Childtable

Status
Not open for further replies.

Seelenfieber

Programmer
Nov 29, 2006
6
DE
Me.DataGrid2.SetDataBinding(Me.DataSet1, "Table1.Rel1")

Dim bmb As BindingManagerBase =
Me.DataGrid2.BindingContext(Me.DataGrid2.DataSource,
Me.DataGrid2.DataMember)

bmb.Current only returns the current Datarow from
Parenttable("Table1")

How can I get a Datarow from
a Childtable, Child-Childtable , ...?

Thanks for reply
 
You will probably have to search the child table for the value in the parent table. I am not sure what you were going for, because your statement is rather hard to follow.

-The answer to your problem may not be the answer to your question.
 
I have 2 Datagrids. One Grid display the parenttable
and the other display the childtable
in relation to the current row in grid1.

Now I want to click on a row in grid2 and like to get
that currentrow of the Childtable.
But the Bindingcontext of this Grid2 returns
the currentrow (Datarow) from parenttable...

Dim bmb As BindingManagerBase =
Me.DataGrid2.BindingContext(Me.DataGrid2.DataSource,
Me.DataGrid2.DataMember)
Dim dr As DataRow = CType(bmb.Current, DataRowView).Row <--


It seems to me that I can solve the problem without Datarow

Me.DataGrid2.Item(Me.DataGrid2.CurrentRowIndex, columns)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top