Hi,
I am using a Rad Schedule control. I am having Schedule group by resources. I want to show Resources on Y axis and Time on X axis. I am using Object Data Source. Below is the code that i am using. Please let me know a possible solution
Object Class File
Code behind file
Can i paste Screenshot here for your quick Reference?
1. How to desable making an new Appoinment before a particulate time (say DateTime.Now)
2. Is there a possible way to show a line on calendar indicating current time.
3. For a particular appointment let us say from 1.45 to 3.15 i need to show multiple colors. Meaning from 1.45 to 2.00 i need to show red color. Then 2.00 to 3.00 i need to show green color and then again from 3.00 to 3.15 i need to show red color. Can this be done?
4. Also i want to show multiple timezones in Scheduler and show corresponding Meeting rooms under that Timezone. Something like Group Meeting Rooms by Timezone.
I am using a Rad Schedule control. I am having Schedule group by resources. I want to show Resources on Y axis and Time on X axis. I am using Object Data Source. Below is the code that i am using. Please let me know a possible solution
| ASPX file | |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> | |
| <%@ 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>Untitled Page</title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> | |
| </asp:ScriptManager> | |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="EndTime" | |
| DataKeyField="Subject" DataSourceID="ObjectDataSource1" | |
| DataStartField="StartTime" DataSubjectField="Subject" | |
| HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" | |
| GroupBy="MeetingRoom" GroupingDirection="Vertical" ShowHeader="false" | |
| ShowViewTabs="False" SelectedView="ResourceView,TimelineView"> | |
| <ResourceTypes> | |
| <telerik:ResourceType DataSourceID="ObjectDataSource1" KeyField="Room.ID" | |
| Name="Room.Name" TextField="Room.Name" ForeignKeyField="Room.ID" /> | |
| </ResourceTypes> | |
| </telerik:RadScheduler> | |
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" | |
| SelectMethod="GetBookings" TypeName="Booking"></asp:ObjectDataSource> | |
| </form> | |
| </body> | |
| </html> | |
Object Class File
| using System; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Summary description for BookingClass | |
| /// </summary> | |
| public class Booking | |
| { | |
| public Booking() | |
| { | |
| } | |
| public Booking(DateTime s, DateTime e, String Subject,MeetingRoom pRoom) | |
| { | |
| StartTime = s; | |
| EndTime = e; | |
| this.Subject = Subject; | |
| Room = pRoom; | |
| } | |
| private DateTime _StartTime; | |
| public DateTime StartTime | |
| { | |
| get { return _StartTime; } | |
| set { _StartTime = value; } | |
| } | |
| private DateTime _EndTime; | |
| public DateTime EndTime | |
| { | |
| get { return _EndTime; } | |
| set { _EndTime = value; } | |
| } | |
| private MeetingRoom _Room; | |
| public MeetingRoom Room | |
| { | |
| get { return _Room; } | |
| set { _Room = value; } | |
| } | |
| private string _Subject; | |
| public string Subject | |
| { | |
| get { return _Subject; } | |
| set { _Subject = value; } | |
| } | |
| public List<Booking> GetBookings() | |
| { | |
| List<Booking> lst = new List<Booking>(); | |
| for (int i = 1; i <= 10; i++) | |
| { | |
| MeetingRoom room = new MeetingRoom(i, "Nalanda " + i.ToString()); | |
| lst.Add(new Booking(DateTime.Now.AddMinutes(10 * i), DateTime.Now.AddMinutes((10 * i) + 20), "Booking " + i.ToString(),room)); | |
| } | |
| return lst; | |
| } | |
| } | |
| public class MeetingRoom | |
| { | |
| public MeetingRoom(int pID, string pName) | |
| { | |
| this.ID = pID; | |
| this.Name = pName; | |
| } | |
| private int _ID; | |
| private string _Name; | |
| public string Name | |
| { | |
| get { return _Name; } | |
| set { _Name = value; } | |
| } | |
| public int ID | |
| { | |
| get { return _ID; } | |
| set { _ID = value; } | |
| } | |
| } |
Code behind file
| using System; | |
| public partial class _Default : System.Web.UI.Page | |
| { | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| } | |
| } |
Can i paste Screenshot here for your quick Reference?
1. How to desable making an new Appoinment before a particulate time (say DateTime.Now)
2. Is there a possible way to show a line on calendar indicating current time.
3. For a particular appointment let us say from 1.45 to 3.15 i need to show multiple colors. Meaning from 1.45 to 2.00 i need to show red color. Then 2.00 to 3.00 i need to show green color and then again from 3.00 to 3.15 i need to show red color. Can this be done?
4. Also i want to show multiple timezones in Scheduler and show corresponding Meeting rooms under that Timezone. Something like Group Meeting Rooms by Timezone.