I have datagrid in which the 0th column has ID. What i want is while clicking on the datagrid the id of the particular row has to be load in the variable in the second form. For this i have created a public variable in the second form
and in the first form i wroteCode:Public editID As Long
but here its not returning any value to EditID while loading the second formCode:Private Sub grdDrugs_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdDrugs.DoubleClick frmDrug.Show() frmDrug.editID = CInt(grdDrugs.Item(0,grdDrugs.CurrentCell.RowIndex).Value()) End Sub
is there any way to do this
Thanks
Sajna




Reply With Quote