Home All Groups Group Topic Archive Search About
Author
16 Oct 2006 2:54 PM
carlor
Hi,

I have a grid view that, when the row is in edit mode, contains a pair of
radio buttons (Yes/No) and 3 edit fields (2 text boxes and a drop down list).
I have business rule that states that if Yes is selected, the 3 edit fields
are required but if No is selected the 3 edit fields are not required and
ideally should not be displayed.

I would like to do this without a round-trip to the server on the radio
button click. Does anyone know how to handle this?

Thanks,

Carlo.

Author
16 Oct 2006 7:50 PM
Robert Haken [MVP]
You can enable/disable the client-side validators on radionbutton's onClick
event.
Use ValidatorEnable(val, enable) function.

For details, see

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp

Robert Haken [MVP ASP/ASP.NET]
HAVIT, s.r.o., www.havit.cz
http://knowledge-base.havit.cz


Show quoteHide quote
"carlor" <car***@discussions.microsoft.com> pí¹e v diskusním pøíspìvku
news:8D08FFA2-AEC9-41A6-8747-0182803A65C9@microsoft.com...
> Hi,
>
> I have a grid view that, when the row is in edit mode, contains a pair of
> radio buttons (Yes/No) and 3 edit fields (2 text boxes and a drop down
> list).
> I have business rule that states that if Yes is selected, the 3 edit
> fields
> are required but if No is selected the 3 edit fields are not required and
> ideally should not be displayed.
>
> I would like to do this without a round-trip to the server on the radio
> button click. Does anyone know how to handle this?
>
> Thanks,
>
> Carlo.
Author
17 Oct 2006 4:31 PM
carlor
Thanks Robert,

That's just what I was looking for.

Carlo.

Show quoteHide quote
"Robert Haken [MVP]" wrote:

> You can enable/disable the client-side validators on radionbutton's onClick
> event.
> Use ValidatorEnable(val, enable) function.
>
> For details, see
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp
>