Hi,
I had tried to show Advanced Form using Advanced Templates exactly.
But when I try to open Advanced Form for new appointment, the All day checkbox is not working. Even the DatePicker and TimePicker controls are not working.
Chrome console display following as error -
Uncaught TypeError: Cannot read property 'EventScheduler_3' of undefined
The following is the client side event handler for OnClientFormCreated -
The bold part in code is the line where this error occurs. And I believe this could be the possible reason for unexpected behavior of Advanced Form.
Can you share with me how I can get rid of this error?
I had tried to show Advanced Form using Advanced Templates exactly.
But when I try to open Advanced Form for new appointment, the All day checkbox is not working. Even the DatePicker and TimePicker controls are not working.
Chrome console display following as error -
Uncaught TypeError: Cannot read property 'EventScheduler_3' of undefined
The following is the client side event handler for OnClientFormCreated -
//<![CDATA[
// Dictionary containing the advanced template client object
// for a given RadScheduler instance (the control ID is used as key).
var
schedulerTemplates = {};
function
SchedulerFormCreated(scheduler, eventArgs)
{
// Create a client-side object only for the advanced templates
var
mode = eventArgs.get_mode();
if
(mode == window.Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||mode == window.Telerik.Web.UI.SchedulerFormMode.AdvancedEdit)
{
// Initialize the client-side object for the advanced form
var
formElement = eventArgs.get_formElement();
var
templateKey = scheduler.get_id() +
"_"
+ mode;
var
advancedTemplate = schedulerTemplates[templateKey];
if
(!advancedTemplate)
{
// Initialize the template for this RadScheduler instance
// and cache it in the schedulerTemplates dictionary
var
schedulerElement = scheduler.get_element();
var
isModal = scheduler.get_advancedFormSettings().modal;
advancedTemplate =
new
window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
advancedTemplate.initialize();
schedulerTemplates[templateKey] = advancedTemplate;
// Remove the template object from the dictionary on dispose.
scheduler.add_disposing(
function
()
{
schedulerTemplates[templateKey] =
null
;
});
}
// Are we using Web Service data binding?
if
(!scheduler.get_webServiceSettings().get_isEmpty())
{
// Populate the form with the appointment data
var
apt = eventArgs.get_appointment();
var
isInsert = mode == window.Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
advancedTemplate.populate(apt, isInsert);
}
}
}
//]]>
The bold part in code is the line where this error occurs. And I believe this could be the possible reason for unexpected behavior of Advanced Form.
Can you share with me how I can get rid of this error?