I am auto generating data grid and I am using check box in Data grid View,
Now i am invoking check box state changed event but it produces the following error
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Here the code
Private Sub PRNT_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles PRNT.CheckedChanged
Some Stuff.
End Sub
When i changes this line
Private PRNT As New DataGridViewCheckBoxColumn
To this
Private Withevents PRNT As New DataGridViewCheckBoxColumn
Then error changes
Event 'CheckedChanged' cannot be found.
What could be the problem.