This is a migrated thread and some comments may be shown as answers.
WPF Scroll to Resource
3 Answers 23 Views
This is a migrated thread and some comments may be shown as answers.
Oksana
Top achievements
Rank 1
Oksana asked on 27 Aug 2015, 12:54 PM

I have an app used for Dispatch Scheduling.

The scheduler is used by dispatchers to assign appointments for technicians. So in my scheduler, they are grouped by technicians and used the GroupHeaderContentTemplateSelector for my templates whether it be Horizontal or Vertical view.

Most of the time they have lots of technicians in their view. To find one technician, you have to scroll to the left or right or up or down depending on the orientation. 

The task is to provide a way for dispatchers to easily locate the technician by let's say right clicking the scheduler and click Go To ... specific technician. 

It should scroll  to that technician in view.

I have seen an implementation for ScrollViewer where you specify the desired position using the ScrollToHorizontalOffset or ScrollToVerticalOffset. What is the best way to locate a specific technician in my case within the grouping as my parameter? Or any implementation that would help implement the requirement would be great.

 

A sample code is very much appreciated.

 

Thanks!

 

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 01 Sep 2015, 05:48 AM
Hello Oksana,

The ScrollIntoView method of RadScheduleView can scroll the view to a certain Slot. So you can set a Resource (technician) to the Slot in order to achieve the needed appproach.  Here is a sample code:

var sl = new Slot()
{
    Start = DateTime.Now,
    End = DateTime.Now.AddHours(1)
};
sl.Resources.Add(new Resource("technician10", "technician"));
ScheduleView.ScrollIntoView(sl);

Hope this helps.

Regards,
Rosi
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Oksana
Top achievements
Rank 1
answered on 14 Sep 2015, 08:49 PM

So I have existing resources (technicians) in view. I pick a technician and use that as my resource but didn't work.

 Same as in your example:

But instead of creating a new resource I just passed the technician I picked.

var sl = new Slot()
{
    Start = DateTime.Now,
    End = DateTime.Now.AddHours(1)
};​

sl.Resources.Add(techResource); //techResource is the technician selected

ScheduleView.ScrollIntoView(sl);​

Should the slot be added to the Scheduler? 

0
Oksana
Top achievements
Rank 1
answered on 14 Sep 2015, 09:26 PM
I made it work. Thanks!
Asked by
Oksana
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Oksana
Top achievements
Rank 1
Share this question
or