Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Validate a Datagrid Edit?

Reply
Thread Tools

Validate a Datagrid Edit?

 
 
Don Hans
Guest
Posts: n/a
 
      12-25-2003
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!



 
Reply With Quote
 
 
 
 
Don Hans
Guest
Posts: n/a
 
      12-25-2003
Sorry for double post - first one gave an error ;-(
"Don Hans" <(E-Mail Removed)> wrote in message
news:1OpGb.392975$(E-Mail Removed) .net...
> 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!
>
>
>



 
Reply With Quote
 
 
 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      12-25-2003
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
"Don Hans" <(E-Mail Removed)> wrote in message
news:1OpGb.392975$(E-Mail Removed) .net...
> 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!
>
>
>



 
Reply With Quote
 
Don Hans
Guest
Posts: n/a
 
      12-25-2003
Ahhh - didnt realize it needed to be in the column with the textbox control

Thanks very much and Happy Xmas!

"Alessandro Zifiglio" <(E-Mail Removed)> wrote in
message news:HlzGb.20503$(E-Mail Removed)...
> 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
> "Don Hans" <(E-Mail Removed)> wrote in message
> news:1OpGb.392975$(E-Mail Removed) .net...
> > 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!
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid validate on update ann ASP .Net Datagrid Control 0 06-25-2006 11:43 PM
validate input in datagrid =?Utf-8?B?bWF0cw==?= ASP .Net 1 05-13-2004 01:16 PM
Validate Datagrid in edit or add (in footer) Tamir Kamara ASP .Net Web Controls 0 01-22-2004 02:31 PM
Use Validation control to validate datagrid edit? Don Hans ASP .Net Web Controls 0 12-25-2003 12:02 AM
How to validate a datagrid (in edit mode)? Ante Perkovic ASP .Net 0 06-24-2003 10:05 AM



Advertisments