I have a datagridview with a hidden column where when I add a new row I update the hidden column with code...
I want to update the hidden column automatically when I add a new row but this wont work as when the form is being drawn the event's kick off causing havoc...
e.g
Private Sub BindingNavigatorAddNewItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem1.Click
Me.ChildRecChanged = True
ToolStripButton1.BackColor = Color.GreenYellow
Me.DataGridView1.CurrentRow.Cells("PersonnelNo").Value = StaffID
End Sub
This fails because row has not yet been added and I cant see any other event that doesn't kick off until after form shown.
Any advice appreciated....
I want to update the hidden column automatically when I add a new row but this wont work as when the form is being drawn the event's kick off causing havoc...
e.g
Private Sub BindingNavigatorAddNewItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem1.Click
Me.ChildRecChanged = True
ToolStripButton1.BackColor = Color.GreenYellow
Me.DataGridView1.CurrentRow.Cells("PersonnelNo").Value = StaffID
End Sub
This fails because row has not yet been added and I cant see any other event that doesn't kick off until after form shown.
Any advice appreciated....