bind current row to text boxes(urgent)
-
hello i want to bind a pirticular row of my table with the textboxes which i have in my form. i am getting that row from the datagrid and that is a current row which is clicked by the user. i have saved that row refernce in a seprate datarow object. now how i will select that pirticular row from my table and display the values of each column in realted textbox
Dim xCM As CurrencyManager Dim drw As DataRowView Dim row As DataRow xCM = CType(DataGrid1.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember), CurrencyManager) '= drw = CType(xCM.Current, DataRowView) row = drw.Row Me.ItemCode.DataBindings.Add("Text", ds.Tables(0), "locid")
the last line bind the first row but i want to bind a cuurent row which is clicked by the user on the datagrid and want to display its values plz help me as soon as possible -
hello i want to bind a pirticular row of my table with the textboxes which i have in my form. i am getting that row from the datagrid and that is a current row which is clicked by the user. i have saved that row refernce in a seprate datarow object. now how i will select that pirticular row from my table and display the values of each column in realted textbox
Dim xCM As CurrencyManager Dim drw As DataRowView Dim row As DataRow xCM = CType(DataGrid1.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember), CurrencyManager) '= drw = CType(xCM.Current, DataRowView) row = drw.Row Me.ItemCode.DataBindings.Add("Text", ds.Tables(0), "locid")
the last line bind the first row but i want to bind a cuurent row which is clicked by the user on the datagrid and want to display its values plz help me as soon as possible