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

StartInsertingInAdvancedForm fires command "update" instead of "insert"

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

we are currently evaluating the brand new RadScheduler for 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!

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
        HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" >
        <telerik:RadScheduler ID="RadScheduler1" runat="server"
            DataDescriptionField="Description" DataEndField="End" DataKeyField="ID"
            DataRecurrenceParentKeyField="RecurrenceParentID" DataReminderField="Reminder"
            DataSourceID="LinqDataSource1" DataStartField="Start" DataSubjectField="Subject"
            EnableDescriptionField="True" Skin="Office2007"
</telerik:RadAjaxPanel >

1 Answer, 1 is accepted

Sort by
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:

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>
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

Please Telerik, tell me if i'm wrong, if not, please update the help at this page:
Anyway, now it is working fine for me. I can edit and insert whenever i want it, with my advancedTemplates.

Asked by
Top achievements
Rank 2
Answers by
Top achievements
Rank 2
Share this question