Hi,
Trying to setup the scheduler for dates on a table setup with IDs and Moving them. Got it to load but cant edit anything. Here is my code
My Update command works in the query Builder when i plug in the correct id's an dates but unfortunately i get an error when i try timeline drag and drop changing.
Trying to setup the scheduler for dates on a table setup with IDs and Moving them. Got it to load but cant edit anything. Here is my code
<form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script type="text/javascript"> //Put your JavaScript code here. </script> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <div> </div> <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="RotationStart" DataKeyField="ScheduleID" DataSourceID="SchedulerDataSource" DataStartField="RotationStart" DataSubjectField="FullName" AllowInsert="False" GroupBy="ServiceName" GroupingDirection="Vertical" Height="600px" SelectedDate="2010-06-28" SelectedView="TimelineView" Skin="Black"> <ResourceTypes> <telerik:ResourceType DataSourceID="ServiceDataSource" ForeignKeyField="ServiceID" KeyField="ServiceID" Name="ServiceName" TextField="ServiceName" /> </ResourceTypes> <TimelineView NumberOfSlots="8" SlotDuration="7.00:00:00" /> </telerik:RadScheduler> <asp:SqlDataSource ID="SchedulerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleEvaluateConnectionString %>" DeleteCommand="DELETE FROM Schedule WHERE (ScheduleID = @ScheduleID)" InsertCommand="INSERT INTO Schedule(StudentID, ServiceID, RotationID) VALUES (@StudentID, @ServiceID, @RotationID)" SelectCommand="SELECT Schedule.ScheduleID, Schedule.StudentID, Schedule.ServiceID, Schedule.RotationID, Rotation.RotationNumber, Rotation.RotationWeek, Rotation.RotationStart, Rotation.RotationEnd, Service.ServiceName, Service.ServiceMax, Student.FullName FROM Rotation INNER JOIN Schedule ON Rotation.RotationID = Schedule.RotationID INNER JOIN Service ON Schedule.ServiceID = Service.ServiceID INNER JOIN Student ON Schedule.StudentID = Student.StudentID" UpdateCommand="UPDATE Schedule SET StudentID = @StudentID, ServiceID = @ServiceID, RotationID = (SELECT RotationID FROM Rotation WHERE (RotationStart = @StartDate)) WHERE (ScheduleID = @ScheduleID)"> <DeleteParameters> <asp:Parameter Name="ScheduleID" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="StudentID" /> <asp:Parameter Name="ServiceID" /> <asp:Parameter Name="RotationID" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="StudentID" /> <asp:Parameter Name="ServiceID" /> <asp:Parameter Name="StartDate" /> <asp:Parameter Name="ScheduleID" /> </UpdateParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="ServiceDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleEvaluateConnectionString %>" SelectCommand="SELECT [ServiceID], [ServiceName] FROM [Service] ORDER BY [ServiceName]"> </asp:SqlDataSource> <asp:SqlDataSource ID="StudentDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleEvaluateConnectionString %>" SelectCommand="SELECT [StudentID], [FullName] FROM [Student] ORDER BY [FullName]"> </asp:SqlDataSource> <asp:SqlDataSource ID="RotationDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleEvaluateConnectionString %>" SelectCommand="SELECT [RotationID], [RotationStart] FROM [Rotation] ORDER BY [RotationStart]"> </asp:SqlDataSource> </form>My Update command works in the query Builder when i plug in the correct id's an dates but unfortunately i get an error when i try timeline drag and drop changing.