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

Page_Validators is undefined when displaying advanced form

3 Answers 332 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 13 Apr 2015, 04:49 PM

I've got a very simple page to try to start using the scheduler. At the moment all the page has on it is the scheduler.

I don't know javascript and have no script code. At the moment all I have done is create a blank form, added a scheduler control, added the radscriptmanager and radajaxmanager, in code behind loaded the datasource for the schedule and that's it.

When I run it the page is displayed and I can see, insert and edit appointments using the standard form. However, if I click options to view the advanced form I get an error:

Unhandled exception at line 23, column 5 in http://localhost:49335/ScriptResource.axd?d=nv7asgRUU0tRmHNR2D6t1FKDG35DvsT9LAUygLmmdVzKrxno8KQVmwLs8qIoJRFRSN2_iVk48PbTDpCzQFpmPsmuSwszBL8PM3oZkazX6hA33N42Fbe9eIkay7-ZsJoBG1bPh5lr6Jn8TgjwZbk5xA2&t=fffffffff11c85e00x800a1391 - JavaScript runtime error: 'Page_Validators' is undefined

The code highlighted is:

function ValidatorUpdateIsValid() {
Page_IsValid = AllValidatorsValid(Page_Validators);
}

In scriptresource.axd

3 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 15 Apr 2015, 06:21 AM
Hello Paul,

The issue seems to be connected with the unobtrusive validation that was included in the 4.5 .NET framework. You can refer to this help topic where the issue is described.

A simple way to workaround the issue is to disable the UnobtrusiveValidationMode by adding the following key to my <appSettings> section in youe web.config:
<add key=”ValidationSettings:UnobtrusiveValidationMode” value=”None”/>

Hope this will help you solve the issue.



Regards,
Plamen
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Paul
Top achievements
Rank 1
answered on 15 Apr 2015, 08:51 AM

Brilliant. That fixed it.

I have a couple more questions if you have a moment. Since I posted the problem I've had a more detailed look at the scheduler.

Ideally I would just prefer to create my own custom edit, insert... forms and implement all of the code to handle the data (my data isn't stored in a simple single table). However, it seems like I cannot do that. I do need to be able to set time and also description so have to use the advanced forms. However, I cannot use recurrent events in the system. At the moment I haven't found any way to disable the recurrent event functionality.

The restriction on not being able to create my own totally custom forms and disable recurrent events has made me wonder whether I could somehow use the calendar control and use day templates to mark days where there are events and then display a list of events completely separate to the control if someone clicks on a day in the calendar (ie click a day and you get the list of events on that day). This is far from ideal and loses lots of functionality from the scheduler but I need to implement my own forms and recurrent events will simply not work in my app.

Another problem: I think the datetime picker control is based on datetime2 type. However, in the scheduler advanced form the date selectors only appear to go back to 1900 and if I enter an earlier date it is marked as invalid. Can I configure it for datetime2 range?

0
Plamen
Telerik team
answered on 16 Apr 2015, 06:08 AM
Hi Paul,

If you want to use description field and not use the recurrence you can set the following properties of RadScheduler:
EnableRecurrenceSupport="false" EnableDescriptionField="true"

As for the datetime controls -you can refer to this help topic where is explained how you can find controls in the advanced form and change their default values.

Hope this will help you solve the issue.

Regards,
Plamen
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Scheduler
Asked by
Paul
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Paul
Top achievements
Rank 1
Share this question
or