Groups | Blog | Home
all groups > dotnet windows forms databinding > march 2005 >

dotnet windows forms databinding : datagrid and textbox


mf_sina
3/26/2005 10:49:12 AM
Hi!
I have a datagrid bound to a dataset and also i have a textbox bound to the
same dataset.
when i navigate in my datagrid i want the textbox also navigate
automatically with my datagrid because textbox is using the same dataset as
it's datasource.
for example when i go to record number 10 in my datagrid , i wish the
textbox goes to the same record automatically.
any help especially codes is welcomed.

Best wishes....



Beth Massi [Architect MVP]
4/14/2005 1:32:05 PM
Me.DataGrid1.Datasource = MyDataSet
Me.DataGrid1.DataMember = "Table1"

Me.TextBox1.DataBindings.Add("Text", MyDataset, "Table1.Field1")

[quoted text, click to view]

AddThis Social Bookmark Button