netravel
asked on
getting text from a row in a datagrid
I have a datagrid that has the first column as a boolean checkbox and the other 5 columns are textbox controls. The user will click the check box for their selection and then I want to get the values of each text box in that row to display on the next form, so I want to populate some variables to pass. How do I achieve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, a little mistake :P
Try This
Dim Field1, Field2, Field3, Field4, Field5 As String
Field1 = Convert.ToString(DataGrid1 .Item(Data Grid1.Curr entRowInde x,0))
Field2 = Convert.ToString(DataGrid1 .Item(Data Grid1.Curr entRowInde x,1))
Field3 = Convert.ToString(DataGrid1 .Item(Data Grid1.Curr entRowInde x,2))
Field4 = Convert.ToString(DataGrid1 .Item(Data Grid1.Curr entRowInde x,3))
Field5 = Convert.ToString(DataGrid1 .Item( DataGrid1.CurrentRowIndex, 4))
GL
Try This
Dim Field1, Field2, Field3, Field4, Field5 As String
Field1 = Convert.ToString(DataGrid1
Field2 = Convert.ToString(DataGrid1
Field3 = Convert.ToString(DataGrid1
Field4 = Convert.ToString(DataGrid1
Field5 = Convert.ToString(DataGrid1
GL
Try This,
On the event click of the colmen checkbox use this to get the other values,
Dim Field1, Field2, Field3, Field4, Field5 As String
Field1 = Convert.ToString(DataGrid1
Field2 = Convert.ToString(DataGrid1
Field3 = Convert.ToString(DataGrid1
Field4 = Convert.ToString(DataGrid1
Field5 = Convert.ToString(DataGrid1
GL