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

[Solved] Validators

2 Answers 138 Views
Input
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 19 Jun 2008, 10:23 AM

I have a number of inputs that are added programmatically to a form, specifically on an Ajax panel.

When adding validators they worked 'til the page made an AjaxRequest, then they'd stop workiing.

So, I figured that the validators were getting screwed by the Ajax call. Reasonable, no?

So, I added a regular ASP Panel to the page - outside of the AjaxPanel -  and added the validators to that.

The thing is they don't seem to be working correctly. The problem is that the client-side code doesn't include the value of ControlToValidate ...
var input_002Erng1_002Efirst_rangevalidator = document.all ? document.all["input_002Erng1_002Efirst_rangevalidator"] : document.getElementById("input_002Erng1_002Efirst_rangevalidator"); 
input_002Erng1_002Efirst_rangevalidator.controltovalidate = ""
input_002Erng1_002Efirst_rangevalidator.errormessage = "The value for field \'A date range From\' is required and must be between 1 Jan 0001 and 31 Dec 9999"
input_002Erng1_002Efirst_rangevalidator.display = "None"
input_002Erng1_002Efirst_rangevalidator.evaluationfunction = "DateInputRangeValidatorEvaluateIsValid"
 

Now, everything I do in the code-behind suggests that ControlToValidate is set. In fact, if I add a new attribute to the validator and set it to ControlToValidate, the value is there.

I know that this isn't a RadInput problem directly, but I was wondering if anyone else had encountered a similar problem using RadInput, validators and AjaxPanels.

--
Stuart

2 Answers, 1 is accepted

Sort by
0
Missing User
answered on 24 Jun 2008, 11:53 AM
Hello Stuart,

We tried to reproduce the problem, but to no avail. Could you please isolate the problem in a small and running project and attach the files to this thread? We will test it locally and try to provide a working solution for you.

Thanks for your time and cooperation.

Greetings,
Plamen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Dan
Top achievements
Rank 1
answered on 24 Jun 2008, 01:10 PM
Plamen,

Thanks for taking the trouble.

I'll see if I can put together something to demonstrate the problem.

--
Stuart
Tags
Input
Asked by
Dan
Top achievements
Rank 1
Answers by
Missing User
Dan
Top achievements
Rank 1
Share this question
or