I don't understand how to group my appointments. :(
For example:
If I have one appointment that occurs 10 times (recurrence), I want these 10 to render on the same row, horizontaly.
And next appointment (if exists) it will render below, and so on.
How do I make the group by?
My first thought was to group by RecurrenceParentID but that doesn't seems to work.
RadScheduler1.DataSource = TaskBL.GetTasks(); |
RadScheduler1.DataKeyField = "Id"; |
RadScheduler1.DataSubjectField = "Name"; |
RadScheduler1.DataStartField = "StartDate"; |
RadScheduler1.DataEndField = "EndDate"; |
RadScheduler1.DataRecurrenceField = "RecurrenceRule"; |
RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentId"; |
RadScheduler1.GroupBy = "RecurrenceParentId"; |
RadScheduler1.GroupingDirection = GroupingDirection.Vertical; |
10 Answers, 1 is accepted
The GroupBy property should be set to a resource type. Please, refer to the Resource Grouping example for a live demo of how the GroupBy property is used.
Best wishes,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Is it not possible?
Maybe I can't use your scheduler control in my scenario!?
Your scheduler is very "outlook calendar" look a like with users and appointments.
It would be nice in future releases if it can be more flat, not so program specific (or how I should explain it)!
A scheduler can be so much more than appointments! :)
I'm building a timeline that shows tasks (that can be recurrence).
I want the task subject on left side and the dates to the right, just as I explained in an earlier thread and your colleague Dimo said it may be possible:
http://www.telerik.com/community/forums/thread/b311D-bktkbg.aspx
I need the timeline to look almost like this:
http://www.svenskwebbhandel.se/timeline.gif
Do you think it is possible to build with your scheduler?
The GroupBy property can be set in code-behind. Please consider the following example of how this is done:
<ResourceTypes> |
<telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="RoomID" |
KeyField="ID" Name="Room" TextField="RoomName" /> |
protected void Page_Load(object sender, EventArgs e) |
{ |
RadScheduler1.TimelineView.GroupBy = "Room"; |
} |
If you need to expose additional info for the appointments you need to use Templates. If you want to have different templates for the different views, please refer to the following kb article:
Creating and adding an appointment template dynamically and accessing the appointment object in the template class
I hope you find these suggestions helpful.
Regards,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
my rad seheduler is dynamic control so how can i set the Resource type dynamatically
Regards
Vairamuthu
Now my problem is i want the grouping only in the timeline view not in the monthly,day,weekly view.
My datatable like this
LinkTitle EventDate EndDate FieldID
company meeting 01/15/2009 08 AM 01/15/2009 09 AM 1
company meeting 01/22/2009 08 AM 01/22/2009 09 AM 2
company meeting 02/22/2009 08 AM 02/22/2009 09 AM 3
Status meeting 01/22/2009 10 AM 01/22/2009 11 AM 4
Status meeting 01/26/2009 10 AM 01/26/2009 11 AM 5
in monthview i want all the meeting should display in the timelineview i want only two row(company meeting,Status meeting).
But i am getting five rows.
This is my code
_radScheduler.DataSource = dtFinalResult;
_radScheduler.DataKeyField = "FieldID";
_radScheduler.DataSubjectField = "LinkTitle";
_radScheduler.DataStartField = "EventDate";
_radScheduler.DataEndField = "EndDate";
_radScheduler.DataBind();
ResourceType resourcetype=new ResourceType();
resourcetype.Name = "MPPScheduler";
resourcetype.DataSource = dtFinalResult;
resourcetype.KeyField = "FieldID";
resourcetype.TextField = "LinkTitle";
resourcetype.ForeignKeyField = "FieldID";
radScheduler.Resourcetypes.Add(resourcetype);
_radScheduler.TimelineView.GroupBy = "MPPScheduler";
_radScheduler.TimelineView.GroupingDirection = GroupingDirection.Vertical;
_radScheduler.TimelineView.HeaderDateFormat = "MMM-dd";
What is the problem?
Regards
Vairam
You should use DataSetHelper class with SelectDistinct method to create a separate datasource for your MPPScheduler resource type. I have attached a sample web site which shows how to create a new datatable with the "Priority" column and then add the "Priority" resource type dynamically to RadScheduler. You have to simply rename the appropriate fields with your own to make your application work as desired.
All the best,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thanks a lot its working for me .
Now My problem is in timelineview Text field is right align and its wrap to the next line.I need the left align with padding and increase the column width.
see this telerik demo link(Margaret Morrison Main Room,black auditorium) this text wrap to next to next line.How can i increase the width of the left hand side column.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx
Regards
Vairamuthu
To achieve this, please set RowHeaderWidth="300px" and apply the following css style:
.rsVerticalHeaderTable th |
{ |
text-align:left !important; |
} |
Regards,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Is any way to change only for timelineview
RowHeaderWidth="300px"
Regards
Vairamuthu
Yes, set the property in code-behind:
protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
if (RadScheduler2.SelectedView == SchedulerViewType.TimelineView) |
RadScheduler2.RowHeaderWidth = Unit.Pixel(300); |
else |
RadScheduler2.RowHeaderWidth = Unit.Pixel(100); |
} |
} |
protected void RadScheduler2_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) |
{ |
if (RadScheduler2.SelectedView == SchedulerViewType.TimelineView) |
RadScheduler2.RowHeaderWidth = Unit.Pixel(300); |
else |
RadScheduler2.RowHeaderWidth = Unit.Pixel(100); |
} |
All the best,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.