Event selection in TimeRuler

3 posts, 0 answers
  1. Aviv
    Aviv avatar
    4 posts
    Member since:
    Oct 2013

    Posted 09 Jan 2014 Link to this post

    Hello,
    The default selection behaviour of the Gantt view is -
    1. When selecting a row in the Grid view part the related event is selected in the Time Ruler view (scrolled horizontally if required to get visible)
    2. When selecting event in the Time Ruler view the row in the Grid view is selected

    My problem is - when selecting a row (in the Grid view) that doesn't contain any events, the Time Ruler scroll (horizontally) to the left (starting of the Visible Range)

    I want the Time Ruler to scroll horizontally only if there is an event for the selected Grid row. If no event is defined for the selected Grid row, leave the Time Ruler horizontal position untouched.

    Thanks!
    Aviv
  2. Polya
    Admin
    Polya avatar
    199 posts

    Posted 14 Jan 2014 Link to this post

    Hello Aviv,

    Currently we do not allow modifications in the scrolling settings. However, I have created a sample project demonstrating a visual "disable" of scrolling in the case described. I assume that by "a row (in the Grid view) that doesn't contain any events" you mean a GanttTask in which the start and end dates are not set. Is my assumption correct?

    In the attached sample project in RadGanttView.SelectionChanged event I check whether in the newly selected GanttTask the start and end dates are with a default DateTime value ( which makes them uninitialized ) and if so I call RadGanttView.ScrollingService.ScrollIntoView(previous_GanttTask). This way we move the view back to the previously selected GanttTask and it appears we have not moved at all.

    Hopefully this helps.

    Regards,
    Polya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aviv
    Aviv avatar
    4 posts
    Member since:
    Oct 2013

    Posted 14 Jan 2014 Link to this post

    Hello Polya,
    Thank you for your answer.

    I tried to avoid the code behind... since I have multiple views that are facing the same issue.
    I think that in this case I will implement a new behavior,  that will take care for the 'gantt_SelectionChanged' so all I have to do is to assign/set this behavior in the xaml.

    Best regards,
    Aviv
Back to Top