bobbynad Posted June 28, 2003 Posted June 28, 2003 Hello , I need to substitute or retrieve a value from the row in the Datagrid where in I click. How could I do using codes. Quote
Leaders dynamic_sysop Posted June 28, 2003 Leaders Posted June 28, 2003 well this will retrieve the value of the item you clicked on : Private Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseUp Dim i As Integer = DataGrid1.CurrentRowIndex Dim j As Integer = DataGrid1.CurrentCell.ColumnNumber MessageBox.Show(DataGrid1.Item(i, j)) End Sub Quote
bobbynad Posted June 28, 2003 Author Posted June 28, 2003 Thanks for the reply , I need the contents of the whole row , such that I can edit the required field in specific. And secondly if the datagrid is in masterdetails format then how could I substitute a value in a particular tables particular field. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.