Page_Validators is undefined when displaying advanced form

4 posts, 1 answers
  1. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 13 Apr 2015 Link to this post

    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

  2. Answer
    Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 15 Apr 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 15 Apr 2015 in reply to Plamen Link to this post

    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?

  5. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 16 Apr 2015 Link to this post

    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.

     
Back to Top