B
Brad Shook
I am trying to bind one column of a datagrid to a seperate textbox and
the rest of the fields to a datagrid. the comments are too large to
fit in a datagrid so I created a textbox below the datagrid and need
it to hold the data for the current record selected in the datagrid.
The data structure is
Parent Datagrid
Child Datagrid
textbox linked to child datagrid
The code binds everything. The currency manager does not change the
textbox to the next record when I select on the next record in the child
datagrid. it is like it stays on 0 so the text box only shows the 1st
record.
Here is a part of the code.
'DataSetWellMobile1 is the parent dataset with all the data
'DGWellResults is the child datagrid I am binding the data to
'txtWellComments is the textbox that I need bound to the child Datagrid
Me.DataSetWellMobile1.Relations.Add( _
New DataRelation( _
relationName:="relWellInfo", _
parentColumn:=Me.DataSetWellMobile1.Tables("TblPeople").Columns("UniqueId"),
_
childColumn:=Me.DataSetWellMobile1.Tables("TblWellMobileInfo").Columns("Pers
onId"),
_
createConstraints:=True))
Me.DGWellResults.DataBindings.Add(New Binding("DataSource",
Me.DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo"))
Me.txtWellComments.DataBindings.Add(New Binding("Text",
DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo.Comments"))
What am I missing.
Thanks,
Brad
the rest of the fields to a datagrid. the comments are too large to
fit in a datagrid so I created a textbox below the datagrid and need
it to hold the data for the current record selected in the datagrid.
The data structure is
Parent Datagrid
Child Datagrid
textbox linked to child datagrid
The code binds everything. The currency manager does not change the
textbox to the next record when I select on the next record in the child
datagrid. it is like it stays on 0 so the text box only shows the 1st
record.
Here is a part of the code.
'DataSetWellMobile1 is the parent dataset with all the data
'DGWellResults is the child datagrid I am binding the data to
'txtWellComments is the textbox that I need bound to the child Datagrid
Me.DataSetWellMobile1.Relations.Add( _
New DataRelation( _
relationName:="relWellInfo", _
parentColumn:=Me.DataSetWellMobile1.Tables("TblPeople").Columns("UniqueId"),
_
childColumn:=Me.DataSetWellMobile1.Tables("TblWellMobileInfo").Columns("Pers
onId"),
_
createConstraints:=True))
Me.DGWellResults.DataBindings.Add(New Binding("DataSource",
Me.DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo"))
Me.txtWellComments.DataBindings.Add(New Binding("Text",
DataSetWellMobile1.TblPeople.DefaultView, "relWellInfo.Comments"))
What am I missing.
Thanks,
Brad