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

Event selection in TimeRuler

2 Answers 46 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Aviv
Top achievements
Rank 1
Aviv asked on 09 Jan 2014, 09:28 AM
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 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 14 Jan 2014, 10:36 AM
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 >>
0
Aviv
Top achievements
Rank 1
answered on 14 Jan 2014, 10:53 AM
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
Tags
GanttView
Asked by
Aviv
Top achievements
Rank 1
Answers by
Polya
Telerik team
Aviv
Top achievements
Rank 1
Share this question
or