Good Day All
i have the Following Query
SELECT distinct ID, Dy, Sess,[Code],[Description],Abrev,[Type],Number,
GrpName,GrpNumber,Duration,[Students],
[Venue],Capacity,
[Staff],[ModlID],[Term]
,[StaffTerm]
,[Date],[Length]
FROM
#Final_Timetable
and the table looks like this
See Screenshot of the table
In my timetable the data will look like this on a custom Schedule that i created myself , it consist of labels and more
Old Viewer
Now on the Lefthand Side you see there are Numbers 1,2,3, till 13. This is because no dates has been used. So i will be using the number of Periods a day. So this data will be comming from the Database and at the top there are days excluding Sundays and Saturdays.
Now i want to use the RadSchedule to Display the timetable
By html looks like this
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="New_Viewer.aspx.cs" Inherits="Viewer_New_Viewer" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GraphicView</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="SqlDataSourceTimetable"
DataEndField="Date" DataKeyField="ID" Skin="Sunset" Height="726px" DataSubjectField="Description" DataStartField="Date" DataRecurrenceField="Dy" DataRecurrenceParentKeyField="Sess">
</telerik:RadScheduler>
</div>
<asp:SqlDataSource ID="SqlDataSourceTimetable" runat="server" ConnectionString="<%$ ConnectionStrings:oDirectConnectionString %>"
OnSelecting="SqlDataSourceTimetable_Selecting" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"
SelectCommand="sp_Timetable_View" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="selectionType" Type="String" />
<asp:SessionParameter Name="selectedItems" SessionField="selectedItems" Type="String" />
<asp:SessionParameter Name="selectedTerms" SessionField="selectedTerms" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
and now i am using the Stored Procedure to get Data and i tested the sp in SQL management studio with its parameters and it brought the data back.
and this is how i used it with the Radschedule and i don't get any appointments when i run the application. in the Server on page load i have add this
protected void Page_Load(object sender, EventArgs e)
{
RadScheduler1.DataBind();
}
and still it does not work.
Thanks
i have the Following Query
SELECT distinct ID, Dy, Sess,[Code],[Description],Abrev,[Type],Number,
GrpName,GrpNumber,Duration,[Students],
[Venue],Capacity,
[Staff],[ModlID],[Term]
,[StaffTerm]
,[Date],[Length]
FROM
#Final_Timetable
and the table looks like this
See Screenshot of the table
In my timetable the data will look like this on a custom Schedule that i created myself , it consist of labels and more
Old Viewer
Now on the Lefthand Side you see there are Numbers 1,2,3, till 13. This is because no dates has been used. So i will be using the number of Periods a day. So this data will be comming from the Database and at the top there are days excluding Sundays and Saturdays.
Now i want to use the RadSchedule to Display the timetable
By html looks like this
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="New_Viewer.aspx.cs" Inherits="Viewer_New_Viewer" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GraphicView</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="SqlDataSourceTimetable"
DataEndField="Date" DataKeyField="ID" Skin="Sunset" Height="726px" DataSubjectField="Description" DataStartField="Date" DataRecurrenceField="Dy" DataRecurrenceParentKeyField="Sess">
</telerik:RadScheduler>
</div>
<asp:SqlDataSource ID="SqlDataSourceTimetable" runat="server" ConnectionString="<%$ ConnectionStrings:oDirectConnectionString %>"
OnSelecting="SqlDataSourceTimetable_Selecting" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"
SelectCommand="sp_Timetable_View" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="selectionType" Type="String" />
<asp:SessionParameter Name="selectedItems" SessionField="selectedItems" Type="String" />
<asp:SessionParameter Name="selectedTerms" SessionField="selectedTerms" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
and now i am using the Stored Procedure to get Data and i tested the sp in SQL management studio with its parameters and it brought the data back.
and this is how i used it with the Radschedule and i don't get any appointments when i run the application. in the Server on page load i have add this
protected void Page_Load(object sender, EventArgs e)
{
RadScheduler1.DataBind();
}
and still it does not work.
Thanks