Validate a Datagrid Edit?

D

Don Hans

Gents,

Trying to use the validation controls to validate a datagrid edit.

I have tried casting the edited cell to a temporary checkbox control, and
then validating that control. However, the validation is not working for
some reason, as the IsValid property is alwyas true, regardless of what &*&^
data I use. I'm thinking that maybe the contol has to have the focus to
validate?

In any case, what is the best way to validate a datagrid cell edit?

Thanks!
 
A

Alessandro Zifiglio

hi Don,
have you placed the validator within the same editItemTemplate as the
control it has to validate. This is the only reason I can think of right now
as to why your validator is not firing. Surely you want to validate when in
edit mode so place your validator within the EditItemTemplate along with the
control its supposed to validate. Should work.
Merry christmas ;)
 
D

Don Hans

Ahhh - didnt realize it needed to be in the column with the textbox control

Thanks very much and Happy Xmas!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top