Hi Friends,
I am new to vb.net.Presently i am using VS 2010,SQL server 2008 express R2 and developing a windows application in vb.net
Problem :
I one form i am using datagrid with 3 columns.
1 col : databound ,type combobox
2 col : text bx
3 col : text box
I want user to choose value from combobox and enter only numeric value in 2nd and 3rd column.I am writing following code :
Private Sub DataGridView1_CellValidating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles Dg_bill.CellValidating
If Dg_bill.CurrentCell.ColumnIndex = 1 Then
If Not IsNumeric(Dg_bill.Item(1, 0).Value) Then
MessageBox.Show("error aa gia je")
End If
End If
End Sub
but the error msg is displayed for all values even when i enter numeric value like '1'.Plz help also in debugging i found Dg_bill.Item(1, 0).Value contains nothing alwyz