Datagridview cellvalidating date

Is there some event that happens in between these two?

Is there a way to view an error that may be preventing the Cell Validated event from running?

@krishnisilva Please read the rules before posting again, in particular the 'keep it organized' one - [icode]For easy readability, always wrap programming code within posts in (code blocks) and (inline code) tags.

provides a convenient way to realize data validation before it is committed to the underlying data source.

SOLUTION To achieve data validation prior the row is committed, you can handle the Cell Validating event, which is raised by the control when the current cell changes or when it goes out of edit mode.

Visible = False Else Msg Box("Wrong Date") masked Text Box1.

Visible = False Else Msg Box("Wrong Time") masked Text Box2.

Canceling this event prevents the user from exiting the cell until a valid value is entered or the edit process is canceled (via Esc key).

Last modified 08-May-2017 13:30