Heey guys
I have a question is it possible to bind tow sql sources in one RadScheudler ? An example with sql would really help
My code
I have a question is it possible to bind tow sql sources in one RadScheudler ? An example with sql would really help
My code
<%@ Page Title="" Language="C#" MasterPageFile="~/ABBMaster.Master" AutoEventWireup="true" CodeBehind="UserScheduler.aspx.cs" Inherits="HolidayTracker.User.UserScheduler" %><asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server"> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function Export(sender, e) { $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, ""); } </script> </telerik:RadCodeBlock> <style type="text/css"> .RadScheduler .rsExportButton { position: absolute; bottom: 0; right: 0; border: 0; height: 24px; width: 24px; background: url('exportButtonli.gif') no-repeat center center; } .RadScheduler .rsAllDayRow .rsExportButton { right: 20px; height: 16px; width: 16px; bottom: 20px; background: url('exportButton.gif'); } #Label1Panel { display: inline !important; } .lblError { background: #CC0000; border: 1px solid darkred; color: white; font: bold 16px "Segoe UI", Arial, sans-serif; vertical-align: middle; display: none; height: 30px; line-height: 28px; position: absolute; padding-left: 5px; width: 743px; z-index: 1001; cursor: pointer; opacity: 0.9; -moz-opacity: 0.9; filter: alpha(opacity=90); } .rsCustomAppointmentContainer div { width: 100% !important; } .rsCustomAppointmentContainer h2 { overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important; } </style> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadScheduler1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="Label1"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Label ID="Label1" runat="server" CssClass="lblError"></asp:Label> <div style="margin: 5px 0"> <asp:ImageButton runat="server" ID="Button2" ImageUrl="exportButton.gif" AlternateText="Export All to Lotus Notes" OnClientClick="Export(this, event); return false;" OnClick="Button2_Click"></asp:ImageButton> </div> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="200"> </telerik:RadAjaxLoadingPanel> <div class="exampleContainer"> <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" DayStartTime="07:00:00" DayEndTime="18:00:00" DataSourceID="SqlDataSource1" DataKeyField="VacationDayId" DataSubjectField="Title" DataStartField="FromDate" DataEndField="ToDate" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnRecurrenceExceptionCreated="RadScheduler1_RecurrenceExceptionCreated"> <AdvancedForm Modal="true"></AdvancedForm> <TimelineView UserSelectable="false"></TimelineView> <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings> <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings> </telerik:RadScheduler> </div> <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=HolidayTrackerEntities" DefaultContainerName="HolidayTrackerEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EntitySetName="HtVacationDays"></asp:EntityDataSource> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [HtVacationDay]" DeleteCommand="DELETE FROM [HtVacationDay] WHERE [VacationDayId] = @original_VacationDayId" InsertCommand="INSERT INTO [HtVacationDay] ([Title], [FromDate], [UserId], [Hours], [ToDate], [RecurrenceRule], [RecurrenceRuleID]) VALUES (@Title, @FromDate, @UserId, @Hours, @ToDate, @RecurrenceRule, @RecurrenceRuleID)" UpdateCommand="UPDATE [HtVacationDay] SET [Title] = @Title, [FromDate] = @FromDate, [UserId] = @UserId, [Hours] = @Hours, [ToDate] = @ToDate, [RecurrenceRule] = @RecurrenceRule, [RecurrenceRuleID] = @RecurrenceRuleID WHERE [VacationDayId] = @original_VacationDayId"> <DeleteParameters> <asp:Parameter Name="original_VacationDayId" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="FromDate" Type="DateTime" /> <asp:Parameter Name="UserId" Type="Int32" /> <asp:Parameter Name="Hours" Type="Double" /> <asp:Parameter Name="ToDate" Type="DateTime" /> <asp:Parameter Name="RecurrenceRule" Type="String" /> <asp:Parameter Name="RecurrenceRuleID" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="FromDate" Type="DateTime" /> <asp:Parameter Name="UserId" Type="Int32" /> <asp:Parameter Name="Hours" Type="Double" /> <asp:Parameter Name="ToDate" Type="DateTime" /> <asp:Parameter Name="RecurrenceRule" Type="String" /> <asp:Parameter Name="RecurrenceRuleID" Type="String" /> <asp:Parameter Name="original_VacationDayId" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> </asp:Content>
Thanks for help and fast answer