Hi,
I've got a RadScheduler with a customized Advanced Edit Form in place, and everything works fine when adding/editing appointments via double-clicking. However, I now need to launch the Advanced Form server-side, and I'm unable to do so successfully. I'm using ShowAdvancedEditForm() to launch it, and when tracing through execution I can see that everything in AdvancedForm.ascx is being run as expected, but the Form is never displayed. Instead, the user is returned to the RadScheduler without any visible change.
Any suggestions as to what I might be doing wrong? I've attached the relevant server-side method below, along with my RadScheduler definition from the page itself. I'm guessing it's because I'm not handling the server-side OnFormCreated event, but after looking at the demos and documentation, I'm at a loss at to what I'd have to do in order to handle it.
I've got a RadScheduler with a customized Advanced Edit Form in place, and everything works fine when adding/editing appointments via double-clicking. However, I now need to launch the Advanced Form server-side, and I'm unable to do so successfully. I'm using ShowAdvancedEditForm() to launch it, and when tracing through execution I can see that everything in AdvancedForm.ascx is being run as expected, but the Form is never displayed. Instead, the user is returned to the RadScheduler without any visible change.
Any suggestions as to what I might be doing wrong? I've attached the relevant server-side method below, along with my RadScheduler definition from the page itself. I'm guessing it's because I'm not handling the server-side OnFormCreated event, but after looking at the demos and documentation, I'm at a loss at to what I'd have to do in order to handle it.
private
bool
EditAppointment(
string
appointmentID)
{
// Load the existing Appointment
Guid appointmentGuid =
new
Guid(appointmentID);
Appointment editApt = RadScheduler_Main.Appointments.FindByID(appointmentGuid);
if
(editApt ==
null
)
{
return
false
;
}
RadScheduler_Main.ShowAdvancedEditForm(editApt);
return
true
;
}
<
telerik:RadScheduler
ID
=
"RadScheduler_Main"
runat
=
"server"
StartInsertingInAdvancedForm
=
"true"
MinutesPerRow
=
"15"
Height
=
"80%"
SelectedView
=
"TimelineView"
FirstDayOfWeek
=
"Monday"
OnAppointmentInsert
=
"RadScheduler_Main_AppointmentInsert"
OnClientFormCreated
=
"schedulerFormCreated"
GroupingDirection
=
"Vertical"
OnClientAppointmentClick
=
"OnClientAppointmentClick"
OnAppointmentUpdate
=
"RadScheduler_Main_AppointmentUpdated"
OverflowBehavior
=
"Scroll"
AppointmentContextMenuSettings-EnableDefault
=
"true"
OnFormCreated
=
"RadScheduler_Main_OnFormCreated"
>
<
AdvancedForm
Modal
=
"true"
/>
<
Reminders
Enabled
=
"false"
/>
<
TimelineView
NumberOfSlots
=
"5"
/>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"App"
ApplyCssClass
=
"rsCategoryOrange"
Text
=
"ELN"
/>
<
telerik:ResourceStyleMapping
Type
=
"App"
ApplyCssClass
=
"rsCategoryGreen"
Text
=
"Reporting"
/>
<
telerik:ResourceStyleMapping
Type
=
"App"
ApplyCssClass
=
"rsCategoryYellow"
Text
=
"Stability"
/>
<
telerik:ResourceStyleMapping
Type
=
"App"
ApplyCssClass
=
"rsCategoryBlue"
Text
=
"Sample Tracker"
/>
</
ResourceStyles
>
<
AdvancedEditTemplate
>
<
scheduler:AdvancedForm
runat
=
"server"
ID
=
"AdvancedEditForm1"
Mode
=
"Edit"
Subject='<%# Bind("Subject") %>'
Start='<%# Bind("Start") %>'
End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
ApplicationID = '<%# Bind("Applicationid") %>'
Task='<%# Bind("Taskid") %>' />
</
AdvancedEditTemplate
>
<
AdvancedInsertTemplate
>
<
scheduler:AdvancedForm
runat
=
"server"
ID
=
"AdvancedEditForm1"
Mode
=
"Insert"
Subject='<%# Bind("Subject") %>'
Start='<%# Bind("Start") %>'
End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
ApplicationID = '<%# Bind("Applicationid") %>'/>
</
AdvancedInsertTemplate
>
</
telerik:RadScheduler
>