Hi all

,
I have a three columns datagridview
first have checkbox, second have textbox and third is databound
if i have checked the textbox, then the user can edit the textbox and only integers should be entered in that cell in that row.
if i uncheck the checkbox, then textbox should be uneditable
I have used following code for textbox(integers only)
CODE
Private Sub DataGridView1_CellValidating(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles DataGridView1.CellValidating
Dim dgtxtbox As DataGridViewTextBoxColumn = DataGridView1.Columns(1)
If e.ColumnIndex = dgtxtbox.DisplayIndex Then
If String.IsNullOrEmpty(e.FormattedValue.ToString()) Then
Exit Sub
End If
If Not IsNumeric(e.FormattedValue) Then
MsgBox("not an integer value")
DataGridView1.CancelEdit()
End If
End If
End Sub
please solve this problem
good bye