Page/Form-level Validation vs. Control-level Validation

2 posts, 0 answers
  1. NW7US
    NW7US avatar
    6 posts
    Member since:
    Aug 2012

    Posted 17 Oct 2012 Link to this post

    I have a form (page) which has several Telerik controls (text boxes, combobox).

    I have a combobox (ID: 'a') with its validation group set to "abc"
    I have a button with its validation group set to "abc" (it fires the validation for the group "abc")
    I have a required field validator attached to the combobox (ID:'a')

    I wish to accomplish the following:

    1) When a user manipulates the combobox, I do NOT wish to validate.
    2) When the focus moves out of the combobox, I do NOT wish to validate.
    3) When the button at which I set the validation group, I *do* wish to validate.

    In other words, I do not want validation to fire while the user is just manipulating the combobox and other fields on the form.  I only wish to validate at the moment when the button is clicked.

    It seems that this "page-level" validation should be a simple setting.  Why should individual controls be validating?  There could be scenarios (such as mine, where the combobox list of items could be changed ON the page, requiring the person to go in and out of the combobox before finalizing the page).  I don't want each control on the page to have individual validation during the view and manipulation of the items on the page -- no control-level validation firing.  I simply want page-level firing.

    Another wish is that I don't have to add extra javascripting to each of the pages for each of the control -- that is a lot of extra "work-arounds" when there could be a simple setting such that the validator only fires if it were fired by the button.

    Does anyone have an insight on how I can accomplish my requirements?

    Thanks in advance.
  2. Kalina
    Kalina avatar
    918 posts

    Posted 22 Oct 2012 Link to this post

    Hi NW7US,

    Let me suggest you take a look at this online demo and the second RadComboBox ("Search form") there.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top