I have multiple datagridviews on one form. I am allowing editing in the
grid, and am performing error checking.
I am validating the data, if it isn't valid, I am cancelling any other
events fired. My problem is, I am validating in grid A, if they click
in Grid B, I am popping up a message box informing them of the error,
but if they click ok on the message box, and then click in grid B
again, it goes on. The following is a code snippet:
If Not SpecialPricingIsValid() Then
With grdvMagSpecialPricing
.ClearSelection()
.CurrentCell=
grdvMagSpecialPricing.CurrentRow.Cells(SetInvalidC olumnNumber)
.Focus()
End With
e.Cancel = True
Exit Sub
End If
I'm not real sure how to bring the focus back to the grid with the
error. I'm setting the currentcell, and setting focus, I would thing
that would do it.
Any help would be appreciated.
--
jpenn44
------------------------------------------------------------------------
jpenn44's Profile:
http://www.hightechtalks.com/m322
View this thread:
http://www.hightechtalks.com/t365040