Hi,
I'm trying to do a custom save when using the Advanced Form in the RadScheduler and I'm having a problem obtaining the modified values. I'm able to drag and drop appointments from a grid but I cannot access the modified values in the Advanced Form.
What I'm experiencing is that the 'Form Created' method is called when initially opening an appointment and when the SAVE or the CANCEL buttons are clicked. Should this occur when the SAVE button is clicked?
protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e)
{
RadTextBox txtDepartment = (RadTextBox)e.Container.Controls[1].FindControl("txtDepartment");
string deptText = e.Appointment.Attributes["txtDepartment"];
}
When the 'RadScheduler1_FormCreated' is called I am not able to get the modified Text Box values. I can only access the values originally loaded into the Advanced Form. Is there a configuration issue? How do I access teh modified values?
Here is my code:
<telerik:RadScheduler ID="RadScheduler1" runat="server" Height="100%" MinutesPerRow="15" ReadOnly="false" RowHeight="23px" StartInsertingInAdvancedForm="true"
DataEndField="END_TIME" DataStartField="STARTDATE" DataDescriptionField="Description" DataSubjectField="AppointmentText" OnNavigationComplete="RadScheduler1_NavigationComplete"
DataKeyField="Build_AppointmentTypeId" EnableDatePicker="true" OnNavigationCommand="RadScheduler1_NavigationCommand"
OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
OnDataBound="RadScheduler1_DataBound" Skin="Metro" OnAppointmentCommand="RadScheduler1_AppointmentCommand" EnableAdvancedForm="true" EnableDescriptionField="true"
OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnFormCreated="RadScheduler1_FormCreated"
OverflowBehavior="Auto" OnClientFormCreated="OnClientFormCreated" OnAppointmentDelete="RadScheduler1_AppointmentDelete" Enabled="true"
CustomAttributeNames="Due, Priority, AppointmentColor, User, RecurrenceRule, Reminder, Room, TimeZoneID, Department, AppointmentType, Quantity, ServiceQuantity, LastModifiedBy, LastModifiedDate, CreatedDate, CreatedBy">
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
<AdvancedForm Modal="true"></AdvancedForm>
<Reminders Enabled="true" MaxAge="2" />
<AppointmentTemplate>
<div class="rsAptSubject">
<%# Container.Appointment.Subject %>
<p></p>
<%# Eval("Description") %>
<p></p>
<%# Eval("Department") %>
</div>
</AppointmentTemplate>
<AdvancedEditTemplate>
<scheduler:AdvancedForm ViewStateMode="Enabled" runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>' Department='<%# Bind("Department") %>' AppointmentType='<%# Bind("AppointmentType") %>'
Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>' Quantity='<%# Bind("Quantity") %>' ServiceQuantity='<%# Bind("ServiceQuantity") %>'
LastModifiedBy='<%# Bind("LastModifiedBy") %>' CreatedBy='<%# Bind("CreatedBy") %>'
LastModifiedDate='<%# Bind("LastModifiedDate") %>' CreatedDate='<%# Bind("CreatedDate") %>'
RoomID='<%# Bind("Room") %>' TimeZoneID='<%# Bind("TimeZoneID") %>' />
</AdvancedEditTemplate>
<AdvancedInsertTemplate>
<scheduler:AdvancedForm ViewStateMode="Enabled" runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
Department='<%# Bind("Department") %>' AppointmentType='<%# Bind("AppointmentType") %>'
Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
LastModifiedBy='<%# Bind("LastModifiedBy") %>' CreatedBy='<%# Bind("CreatedBy") %>'
LastModifiedDate='<%# Bind("LastModifiedDate") %>' CreatedDate='<%# Bind("CreatedDate") %>'
AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>' Quantity='<%# Bind("Quantity") %>' ServiceQuantity='<%# Bind("ServiceQuantity") %>'
RoomID='<%# Bind("Room") %>' TimeZoneID='<%# Bind("TimeZoneID") %>' />
</AdvancedInsertTemplate>
<TimelineView UserSelectable="false" />
<TimeSlotContextMenuSettings EnableDefault="true" />
<AppointmentContextMenuSettings EnableDefault="true" />
<ResourceTypes>
<telerik:ResourceType KeyField="ColorSequenceId" Name="ColorSequenceId" TextField="ColorSequenceId" ForeignKeyField="ColorSequenceId"></telerik:ResourceType>
</ResourceTypes>
</telerik:RadScheduler>
Thank you,
Jeff-