<telerik:RadScheduler ID="RadScheduler1" runat="server"
DataEndField="EDateTime" DataKeyField="Appt_ID"
DataSourceID="sdsAppointment" DataStartField="SDateTime" DayEndTime="21:00:00"
DataSubjectField="Remark" HoursPanelTimeFormat="htt" Skin="Outlook"
ValidationGroup="RadScheduler1">
<InlineInsertTemplate>
<asp:TextBox runat="server" ID="RemarkTextBox" Text='<%# Bind("Remark") %>' Width="99%"></asp:TextBox>
User:
<asp:TextBox runat="server" ID="LNameTextBox" Text='<%# Bind("LName") %>' Width="99%"></asp:TextBox>
<asp:LinkButton runat="server" ID="InsertLinkButton" CommandName="Insert" Text="Insert"></asp:LinkButton>
<asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
</InlineInsertTemplate>
<InlineEditTemplate>
<asp:TextBox runat="server" ID="RemarkTextBox" Text='<%# Bind("Remark") %>' Width="99%"></asp:TextBox>
User:
<asp:TextBox runat="server" ID="LNameTextBox" Text='<%# Bind("LName") %>' Width="99%"></asp:TextBox>
<asp:LinkButton runat="server" ID="UpdateLinkButton" CommandName="Update" Text="Update"></asp:LinkButton>
<asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
</InlineEditTemplate>
</telerik:RadScheduler>
<
asp:SqlDataSource ID="sdsAppointment" runat="server"
ConnectionString="<%$ ConnectionStrings:ClinicMgmtConnectionString %>"
DeleteCommand="spAppointment_Delete" DeleteCommandType="StoredProcedure"
InsertCommand="spAppointment_Insert" InsertCommandType="StoredProcedure"
SelectCommand="spAppointment_Select" SelectCommandType="StoredProcedure"
UpdateCommand="spAppointment_Update" UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="Appt_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Appt_ID" Type="Int32" />
<asp:Parameter Name="SDateTime" Type="DateTime" />
<asp:Parameter Name="EDateTime" Type="DateTime" />
<asp:Parameter Name="Remark" Type="String" />
<asp:Parameter Name="LName" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="SDateTime" Type="DateTime"/>
<asp:Parameter Name="EDateTime" Type="DateTime" />
<asp:Parameter Name="Remark" Type="String" />
<asp:Parameter Name="LName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<
telerik:RadTextBox ID="txtEstbName" runat="server" MaxLength="150" Skin="Office2007" ></telerik:RadTextBox>
<ajaxToolkit:ValidatorCalloutExtender ID="vc1" runat="server" TargetControlID="rfv1" Width="200px" HighlightCssClass="validatorCalloutHighlight" WarningIconImageUrl="~/images/warning.png" CloseImageUrl="~/images/close.png">
</ajaxToolkit:ValidatorCalloutExtender>
<asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="Please enter establishment name" ControlToValidate="txtEstbName" Visible="true" Display="None"></asp:RequiredFieldValidator>
css class........................
.validatorCalloutHighlight
{
background-color:#FF9999;
}


I'm having trouble with the controlparameter of a ListBox which points to same RadGrid where the Listbox is used.
I want to populate the Listbox depending on the selected value of the Grid, so I've set a controlparameter in the datasource of the ListBox which points to the selectedItem of the Grid. However, the controlparameter always gets the default value. If I set the controlparameter to another grid (not the grid which is the parent of the ListBox) it works fine.
| <GRID id=g1 Datasource = DS1> |
| <VIEW> |
| <EDIT> |
| <LISTBOX Datasource=DS2></LISTBOX> |
| </EDIT> |
| </GRID> |
| <DS1> |
| ... |
| </DS1> |
| <DS2> |
| <selectparameters> |
| <asp:ControlParameter ControlID="g1" DefaultValue="0" Name="id" PropertyName="SelectedValue" Type="Int32" /> |
| </selectparameters> |
| </DS2> |

#region
RadScheduler AppointmentCommand Event
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
{
if (e.CommandName == "Export")
{
//RadAjaxManager1.RaisePostBackEvent(e.ToString());
TimeSpan currentOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
//string iCal = RadScheduler.Export(apt, currentOffset);
WriteCalendar(
RadScheduler.ExportToICalendar(e.Container.Appointment, currentOffset));
}
}
#endregion
#region
WriteCalendar (for export to outlook)
public void WriteCalendar(string data)
{
HttpResponse response = Page.Response;
response.Clear();
response.Buffer =
true;
response.ContentType =
"text/calendar";
response.ContentEncoding =
Encoding.UTF8;
response.Charset =
"utf-8";
response.AddHeader(
"Content-Disposition", "attachment;filename=\"Appointment.ics\"");
response.Write(data);
response.End();
}
#endregion
| <telerik:RadScriptManager ID="rsm" runat="server" /> |
| <div> |
| <telerik:RadListBox ID="rlb" runat="server" Height="100px"> |
| <Items> |
| <telerik:RadListBoxItem Text="09:30" /> |
| <telerik:RadListBoxItem Text="10:00" /> |
| <telerik:RadListBoxItem Text="10:30" /> |
| <telerik:RadListBoxItem Text="11:00" /> |
| <telerik:RadListBoxItem Text="11:30" Selected="true" /> |
| <telerik:RadListBoxItem Text="12:00" /> |
| <telerik:RadListBoxItem Text="12:30" /> |
| <telerik:RadListBoxItem Text="13:00" /> |
| <telerik:RadListBoxItem Text="13:30" /> |
| </Items> |
| </telerik:RadListBox> |
| </div> |