This is a migrated thread and some comments may be shown as answers.

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

1 Answer 37 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
NW7US
Top achievements
Rank 1
NW7US asked on 17 Oct 2012, 04:41 PM
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.

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 22 Oct 2012, 11:44 AM
Hi NW7US,

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

Kind regards,
Kalina
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.
Tags
ComboBox
Asked by
NW7US
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or