Gridview: Edit row validation

Discussion in 'ASP .Net Web Controls' started by carlor, Oct 16, 2006.

  1. carlor

    carlor Guest

    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.
    carlor, Oct 16, 2006
    #1
    1. Advertising

  2. 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


    "carlor" <> pí¹e v diskusním pøíspìvku
    news:...
    > 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.
    Robert Haken [MVP], Oct 16, 2006
    #2
    1. Advertising

  3. carlor

    carlor Guest

    carlor, Oct 17, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,308
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  2. H5N1
    Replies:
    0
    Views:
    2,697
  3. Replies:
    5
    Views:
    645
  4. D
    Replies:
    0
    Views:
    195
  5. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    377
    Jaime Stuardo
    Apr 7, 2006
Loading...

Share This Page