I have looked for an answer to my problem, but cannot figure it out. Here is a copy of my code. When I execute it, it errors in the _FormCreated as the subjectBox is Nothing.
<telerik:RadScheduler runat="server" ID="calEvents" Width="925" ShowViewTabs="false" StartEditingInAdvancedForm="false" Skin="Office2007"
OnAppointmentCommand="RadScheduler1_AppointmentCommand" OnFormCreated="calEvents_FormCreated" OnFormCreating="calEvents_FormCreating">
<InlineInsertTemplate>
<div id="InlineInsertTemplate">
<table cellpadding="0" class="0" runat="server">
<tr>
<td colspan="6">
<asp:TextBox ID="TitleTextBox" runat="server" Width="90%" TextMode="MultiLine" Height="20px"/></td></tr>
<tr>
<td width="3%">
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert">
<asp:Image runat="server" ID="insertImage" ImageUrl="~/Images/tick.png" AlternateText="insert" /></asp:LinkButton></td>
<td width="7%">
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel">
<asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
</asp:LinkButton></td>
<td width="18%">
<asp:Label ID="Label7" CssClass="Normal11" runat="server" Text="Background Color" /></td>
<td width="37%" valign="middle">
<asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonList" RepeatDirection=Horizontal>
<asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
<asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
<asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
</asp:RadioButtonList></td>
<td width="35%">
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="AdvancedInsertOptions" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton></td>
</tr>
</table>
</div>
</InlineInsertTemplate>
<AdvancedInsertTemplate>
<div id="AdvancedInsertTemplate">
<table id="Table2" cellpadding="0" class="0" runat="server">
<tr>
<td>
<asp:Label ID="Label8" AssociatedControlID="TitleTextBox" runat="server" CssClass="inline-label">Description</asp:Label></td></tr>
<tr>
<td>
<asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Width="97%" TextMode="MultiLine"></asp:TextBox></td></tr>
<tr>
<td width="3%">
<asp:Label ID="Label5" AssociatedControlID="StartInput" runat="server" CssClass="inline-label">Start time:</asp:Label></td>
<td width="7%">
<telerik:RadDateInput ID="StartInput" runat="server"/></td></tr>
<tr>
<td width="18%">
<asp:Label ID="Label6" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label></td>
<td>
<telerik:RadDateInput ID="EndInput" runat="server"/></td></tr>
<tr>
<td width="37%" valign="middle">
<asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonListAdvanced" RepeatDirection=Horizontal>
<asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
<asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
<asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
</asp:RadioButtonList></td></tr>
<tr>
<td width="35%">
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert"/></td>
<td width="3%">
<asp:LinkButton ID="UpdateButtonAdvanced" runat="server" CommandName="Insert">
<asp:Image runat="server" ID="updateImage" ImageUrl="~/Images/tick.png" AlternateText="update" /></asp:LinkButton></td>
<td width="7%">
<asp:LinkButton ID="CancelButtonAdvanced" runat="server" CausesValidation="False" CommandName="Cancel">
<asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
</asp:LinkButton></td>
</tr>
</table>
</div>
</AdvancedInsertTemplate>
</telerik:RadScheduler>
Protected Sub calEvents_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs)
Dim scheduler As RadScheduler = DirectCast(sender, RadScheduler)
If e.Container.Mode = SchedulerFormMode.AdvancedInsert OrElse e.Container.Mode = SchedulerFormMode.AdvancedEdit Then
Dim subjectBox As TextBox = DirectCast(e.Container.FindControl("TitleTextBox"), TextBox)
subjectBox.Text = e.Appointment.Subject
End If
End Sub
Thanks so much,
Susan
<telerik:RadScheduler runat="server" ID="calEvents" Width="925" ShowViewTabs="false" StartEditingInAdvancedForm="false" Skin="Office2007"
OnAppointmentCommand="RadScheduler1_AppointmentCommand" OnFormCreated="calEvents_FormCreated" OnFormCreating="calEvents_FormCreating">
<InlineInsertTemplate>
<div id="InlineInsertTemplate">
<table cellpadding="0" class="0" runat="server">
<tr>
<td colspan="6">
<asp:TextBox ID="TitleTextBox" runat="server" Width="90%" TextMode="MultiLine" Height="20px"/></td></tr>
<tr>
<td width="3%">
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert">
<asp:Image runat="server" ID="insertImage" ImageUrl="~/Images/tick.png" AlternateText="insert" /></asp:LinkButton></td>
<td width="7%">
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel">
<asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
</asp:LinkButton></td>
<td width="18%">
<asp:Label ID="Label7" CssClass="Normal11" runat="server" Text="Background Color" /></td>
<td width="37%" valign="middle">
<asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonList" RepeatDirection=Horizontal>
<asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
<asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
<asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
</asp:RadioButtonList></td>
<td width="35%">
<asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="AdvancedInsertOptions" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton></td>
</tr>
</table>
</div>
</InlineInsertTemplate>
<AdvancedInsertTemplate>
<div id="AdvancedInsertTemplate">
<table id="Table2" cellpadding="0" class="0" runat="server">
<tr>
<td>
<asp:Label ID="Label8" AssociatedControlID="TitleTextBox" runat="server" CssClass="inline-label">Description</asp:Label></td></tr>
<tr>
<td>
<asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Width="97%" TextMode="MultiLine"></asp:TextBox></td></tr>
<tr>
<td width="3%">
<asp:Label ID="Label5" AssociatedControlID="StartInput" runat="server" CssClass="inline-label">Start time:</asp:Label></td>
<td width="7%">
<telerik:RadDateInput ID="StartInput" runat="server"/></td></tr>
<tr>
<td width="18%">
<asp:Label ID="Label6" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label></td>
<td>
<telerik:RadDateInput ID="EndInput" runat="server"/></td></tr>
<tr>
<td width="37%" valign="middle">
<asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonListAdvanced" RepeatDirection=Horizontal>
<asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
<asp:ListItem Text="Light Blue" Value="Light Blue"></asp:ListItem>
<asp:ListItem Text="Tan" Value="Tan"></asp:ListItem>
</asp:RadioButtonList></td></tr>
<tr>
<td width="35%">
<asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert"/></td>
<td width="3%">
<asp:LinkButton ID="UpdateButtonAdvanced" runat="server" CommandName="Insert">
<asp:Image runat="server" ID="updateImage" ImageUrl="~/Images/tick.png" AlternateText="update" /></asp:LinkButton></td>
<td width="7%">
<asp:LinkButton ID="CancelButtonAdvanced" runat="server" CausesValidation="False" CommandName="Cancel">
<asp:Image runat="server" ID="Image2" ImageUrl="~/Images/cancel.png" AlternateText="cancel" />
</asp:LinkButton></td>
</tr>
</table>
</div>
</AdvancedInsertTemplate>
</telerik:RadScheduler>
Protected Sub calEvents_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs)
Dim scheduler As RadScheduler = DirectCast(sender, RadScheduler)
If e.Container.Mode = SchedulerFormMode.AdvancedInsert OrElse e.Container.Mode = SchedulerFormMode.AdvancedEdit Then
Dim subjectBox As TextBox = DirectCast(e.Container.FindControl("TitleTextBox"), TextBox)
subjectBox.Text = e.Appointment.Subject
End If
End Sub
Thanks so much,
Susan