Home All Groups Group Topic Archive Search About

How to fire OnClick with disabled controls?

Author
13 Jun 2005 8:36 PM
John Walker
Hi,
In my ASP.NET datagrid I have a TemplateColumn which contains an
asp:Checkbox control.  Sometimes this checkbox will be disabled, and when it
is disabled, when the user tries to click on it, I would like to popup a
Javascript alert that says something like, "You can't check here till you
fill in the delivery date!", but when the checkbox is disabled, the OnClick
event won't fire.  Is there a way around this?

Thanks,
John

Author
14 Jun 2005 12:13 AM
Alvin Bruney [MVP - ASP.NET]
this behavior is by design, you account for that in your documentation.
allowing users to go against the grain leads to unrealistic expectations in
software

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Show quoteHide quote
"John Walker" <JohnWal***@discussions.microsoft.com> wrote in message
news:74BF08B2-64C9-4D78-8253-060B35FDB0DE@microsoft.com...
> Hi,
> In my ASP.NET datagrid I have a TemplateColumn which contains an
> asp:Checkbox control.  Sometimes this checkbox will be disabled, and when
> it
> is disabled, when the user tries to click on it, I would like to popup a
> Javascript alert that says something like, "You can't check here till you
> fill in the delivery date!", but when the checkbox is disabled, the
> OnClick
> event won't fire.  Is there a way around this?
>
> Thanks,
> John