Monday, March 26, 2012

Validating in a datagrid

Hi All
I'm trying to validate some values in a datagrid so that if the user does
not fill in all required fields the focus remains in the row until they
complete the requirements or cancel the entry. Presently I'm using the
DataRowChangeEventArgs
to check the columns for the required values and then ending the edit and
rejecting the changes if they fail. However they are not restrained in the
record so they can still leave the row uncompleted. Anybody know how I can
hold the user in the same row until all requirements are met
Thanks
KedsKarl:
Would the CurrentCellChange event work for you?
"Karl" <Karl@.sunesis.com.au> wrote in message
news:uPjUifW6DHA.1632@.TK2MSFTNGP12.phx.gbl...
> Hi All
> I'm trying to validate some values in a datagrid so that if the user does
> not fill in all required fields the focus remains in the row until they
> complete the requirements or cancel the entry. Presently I'm using the
> DataRowChangeEventArgs
> to check the columns for the required values and then ending the edit and
> rejecting the changes if they fail. However they are not restrained in the
> record so they can still leave the row uncompleted. Anybody know how I can
> hold the user in the same row until all requirements are met
>
> Thanks
>
> Keds
>

No comments:

Post a Comment