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

StartInsertingInAdvancedForm fires command "update" instead of "insert"

1 Answer 82 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Lucien
Top achievements
Rank 2
Lucien asked on 16 Nov 2010, 09:45 PM
Hello,

we are currently evaluating the brand new RadScheduler for Asp.net Ajax Q3 2010.
I set  StartEditingInAdvancedForm="true" and StartInsertingInAdvancedForm="true" then went in debug mode.
I doubled clicked on an empty space to show the "AdvancedInsertTemplate" form,
it showed up, i entered some text inside the Subject textfield then pressed saved.
I put a break point at the server method "RadScheduler1_AppointmentCommand" and expected to see
e.CommandName set to "Insert"
but unfortunately for me, i was surprised to see that
e.CommandName was set to "update" !!!

Any Idea??? We tried and tried again, no clue.
We just realised that, when StartEditingInAdvancedForm  and StartInsertingInAdvancedForm are set to "false", then e.CommandName is set to "Insert", when clicking on an empty  place, and set to "update" when clicking on an filled placed.

Please, it's urgent, we really want to know if we should use Radscheduler for our business logic.

Thank you in advance for any hint!
Lucien

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
        HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" >
        <telerik:RadScheduler ID="RadScheduler1" runat="server"
            DataDescriptionField="Description" DataEndField="End" DataKeyField="ID"
            DataRecurrenceField="RecurrenceRule"
            DataRecurrenceParentKeyField="RecurrenceParentID" DataReminderField="Reminder"
            DataSourceID="LinqDataSource1" DataStartField="Start" DataSubjectField="Subject"
            EnableDescriptionField="True" Skin="Office2007"
            AdvancedForm-Modal="false"
            EnableExactTimeRendering="True"
            Height="100%"            
            StartEditingInAdvancedForm="true"
            StartInsertingInAdvancedForm="true"            
            OnAppointmentCommand="RadScheduler1_AppointmentCommand"
            OnFormCreated="RadScheduler1_FormCreated"                         
            >
.......
</telerik:RadAjaxPanel >

1 Answer, 1 is accepted

Sort by
0
Lucien
Top achievements
Rank 2
answered on 17 Nov 2010, 02:21 PM
Ok, now i finally found the problem, it was due to the help documentation i followed: http://www.telerik.com/help/aspnet-ajax/scheduler-custom-modal-advanced-template.html

Here under "AdvancedInsertTemplate", you have an "update" button as follow:
<asp:LinkButton CommandName="Update" runat="server" ID="UpdateButton" CssClass="rsAdvEditSave"
 <span> <%# Container.Appointment.Owner.Localization.Save%> </span>
</asp:LinkButton>
And that was my problem, because the CommandName was set to "Update"!
And everytime i tried to insert a new item, it was trying to update something not yet existing!

So, it should be an "Insert" button for the "AdvancedInsertTemplate"!
Something like this:
<asp:LinkButton CommandName="Insert" runat="server" ID="InsertButton" CssClass="rsAdvEditSave">  
 <span> <%# Container.Appointment.Owner.Localization.Save%> </span
</asp:LinkButton>

Please Telerik, tell me if i'm wrong, if not, please update the help at this page: http://www.telerik.com/help/aspnet-ajax/scheduler-custom-modal-advanced-template.html
Anyway, now it is working fine for me. I can edit and insert whenever i want it, with my advancedTemplates.

Lucien
Tags
Scheduler
Asked by
Lucien
Top achievements
Rank 2
Answers by
Lucien
Top achievements
Rank 2
Share this question
or