Hello,
I am having an issue with the custom templates with the scheduler, What i am trying to do is, have a custom template for inline insert and for the advanced. What i did was create a template for the inline insert with 3 buttons (insert, cancel, advanced), the insert and cancel buttons work fine, but after i click the advanced it throws a "Object reference not set to an instance of an object." and it has this stack trace "
<pro:RadScheduler runat="server" ID="RadScheduler1" Width="750px" SelectedDate="2007-03-30"
DayStartTime="08:00:00" DayEndTime="18:00:00" ShowViewTabs="false" StartEditingInAdvancedForm="false"
DataSourceID="MessagesDataSource" DataKeyField="MessageId" DataSubjectField="MessageText"
DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"
DataRecurrenceParentKeyField="RecurrenceParentID" OnAppointmentCommand="RadScheduler1_AppointmentCommand"
OnFormCreated="RadScheduler1_FormCreated" OnFormCreating="RadScheduler1_FormCreating">
<AppointmentTemplate>
<div>
</div>
</AppointmentTemplate>
<InlineEditTemplate>
<div>
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
</asp:LinkButton>
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
</div>
</InlineEditTemplate>
<InlineInsertTemplate>
<div>
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
</asp:LinkButton>
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
</div>
</InlineInsertTemplate>
<AdvancedEditTemplate>
<div>
Advanced EDIT TEMP
</div>
</AdvancedEditTemplate>
<AdvancedInsertTemplate>
<div>
Advanced TEMP
</div>
</AdvancedInsertTemplate>
</pro:RadScheduler>
Regards
I am having an issue with the custom templates with the scheduler, What i am trying to do is, have a custom template for inline insert and for the advanced. What i did was create a template for the inline insert with 3 buttons (insert, cancel, advanced), the insert and cancel buttons work fine, but after i click the advanced it throws a "Object reference not set to an instance of an object." and it has this stack trace "
Telerik.Web.UI.RadScheduler.SwitchToAdvancedMode() +202
Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +582
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 "
But if I use the default template for the inline insert then click "options" it will show my custom advanced template.
Seems like i am missing something, so i would appreciate any help.
Here is my code for the schedule control:
<pro:RadScheduler runat="server" ID="RadScheduler1" Width="750px" SelectedDate="2007-03-30"
DayStartTime="08:00:00" DayEndTime="18:00:00" ShowViewTabs="false" StartEditingInAdvancedForm="false"
DataSourceID="MessagesDataSource" DataKeyField="MessageId" DataSubjectField="MessageText"
DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"
DataRecurrenceParentKeyField="RecurrenceParentID" OnAppointmentCommand="RadScheduler1_AppointmentCommand"
OnFormCreated="RadScheduler1_FormCreated" OnFormCreating="RadScheduler1_FormCreating">
<AppointmentTemplate>
<div>
</div>
</AppointmentTemplate>
<InlineEditTemplate>
<div>
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
</asp:LinkButton>
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
</div>
</InlineEditTemplate>
<InlineInsertTemplate>
<div>
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancel">
</asp:LinkButton>
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton>
</div>
</InlineInsertTemplate>
<AdvancedEditTemplate>
<div>
Advanced EDIT TEMP
</div>
</AdvancedEditTemplate>
<AdvancedInsertTemplate>
<div>
Advanced TEMP
</div>
</AdvancedInsertTemplate>
</pro:RadScheduler>
Regards