This is a migrated thread and some comments may be shown as answers.

Select Resource ID from TimeLineView from mouse position

6 Answers 129 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Karl balshaw
Top achievements
Rank 1
Karl balshaw asked on 02 Nov 2010, 04:29 PM
Hi,

I am using the TimeLineView and have a number of (1 or more) employees set as my resouces.

I need to be able to identify the resource ID when the user right clicks on the radScheduler control to bring up the context menu.

This inculdes if the user clicks the appointment, the cell or even the resource label (if possible).

Any thoughts or guidance

Many thanks

Karl

6 Answers, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 05 Nov 2010, 04:06 PM
Hello Karl,

Thank you for writing.

You can subscribe to the MouseDown of RadScheduler. In this event you can get the cell which is under the mouse cursor. From this cell you can take the parent view. This view has only one resource, because the RadScheduler is grouped by resources.
Point point = this.radScheduler1.PointToClient(Cursor.Position);
TimelineGroupingByResourcesElement groupedDayViewElement = this.radScheduler1.SchedulerElement.ViewElement as TimelineGroupingByResourcesElement;
SchedulerCellElement cellElement = SchedulerUIHelper.GetCellAtPoint(point, groupedDayViewElement.GetTimelineElements());
SchedulerTimelineViewElement timelneViewElement = cellElement.Parent.Parent as SchedulerTimelineViewElement;
MessageBox.Show(timelneViewElement.View.GetResources()[0].Name);

In case you have further questions, feel free to contact us.

All the best,
Dobry Zranchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
gezim
Top achievements
Rank 1
answered on 06 Feb 2012, 10:33 AM
Hi, 
I want to know if i can change header view of resources on Telerik Scheduler. I want to set it vertically :(
0
Ivan Todorov
Telerik team
answered on 06 Feb 2012, 12:56 PM
Hello gezim,

Currently, modifying the layout of resource headers is not supported. They are aligned vertically only in TimelineView. You can see this on the attached screenshot. To enable TimelineView, you can use the following code:
this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;

I hope this helps. Feel free to ask if you have any additional questions.

All the best,
Ivan Todorov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
gezim
Top achievements
Rank 1
answered on 06 Feb 2012, 01:32 PM
hmmm.. I was thinking how I can set resources header text like Timeline Grouping example. The header text is from bottom to top, how can I do it? any property??
0
gezim
Top achievements
Rank 1
answered on 06 Feb 2012, 01:35 PM
see this picture :)
0
Ivan Todorov
Telerik team
answered on 09 Feb 2012, 10:20 AM
Hi gezim,

The resource header text in grouped TimelineView should be aligned from bottom to top by default. Nevertheless, you can the rotation angle of the text by using the following code:
this.radScheduler1.SchedulerElement.SetResourceHeaderAngleTransform(SchedulerViewType.Timeline, -90);

I hope you find this useful.

All the best,
Ivan Todorov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Scheduler and Reminder
Asked by
Karl balshaw
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
gezim
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or