WPF Scroll to Resource

4 posts, 0 answers
  1. Oksana
    Oksana avatar
    23 posts
    Member since:
    Mar 2009

    Posted 27 Aug 2015 Link to this post

    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.




  2. Rosi
    Rosi avatar
    2527 posts

    Posted 01 Sep 2015 Link to this post

    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"));

    Hope this helps.

    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
  3. DevCraft banner
  4. Oksana
    Oksana avatar
    23 posts
    Member since:
    Mar 2009

    Posted 14 Sep 2015 in reply to Rosi Link to this post

    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


    Should the slot be added to the Scheduler? 

  5. Oksana
    Oksana avatar
    23 posts
    Member since:
    Mar 2009

    Posted 14 Sep 2015 in reply to Oksana Link to this post

    I made it work. Thanks!
Back to Top