6 Answers, 1 is accepted
0
Hello Richard,
Currently we do not allow modifications in the scrolling settings.
The only thing I can suggest is returning the scroll into the previously selected GanttTask, when the RadGanttView selection changes.
I have created a sample project demonstrating this approach. In the attached sample project in RadGanttView.SelectionChanged event 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. You can insert your custom logic to disable the scrolling in the RadGanttView.SelectionChanged event.
I've logged this feature request in our Feedback Portal where you can track its status and vote to raise its priority.
Regards,
Polya
Telerik
Currently we do not allow modifications in the scrolling settings.
The only thing I can suggest is returning the scroll into the previously selected GanttTask, when the RadGanttView selection changes.
I have created a sample project demonstrating this approach. In the attached sample project in RadGanttView.SelectionChanged event 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. You can insert your custom logic to disable the scrolling in the RadGanttView.SelectionChanged event.
I've logged this feature request in our Feedback Portal where you can track its status and vote to raise its priority.
Regards,
Polya
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Marcus
Top achievements
Rank 2
answered on 24 Nov 2014, 08:03 AM
Hello Polya,
thank you for your sample but it dosn't work for me.
Gantt is scrolling to each selected item (wich is not completly in the visible area) like before.
Please can you check the sample?
Regards,
Richard
thank you for your sample but it dosn't work for me.
Gantt is scrolling to each selected item (wich is not completly in the visible area) like before.
Please can you check the sample?
Regards,
Richard
0
Hello Richard,
The sample project I sent is not fully implemented - I left the check when to scroll to the previous item to be implemented by you.
If, however the desired scenario is to disable scrolling on selection whatsoever I can suggest a better solution:
Internally the RadGanttView contains 3 ScrollBars - 2 horizontal ( for the GridView part and for the TimeRuler part ) and 1 vertical.
1) We can get these ScrollBars using the RadGanttView.ChildrenOfType<ScrollBar>() method.
2) Also we can handle the ScrollBar.Scroll event that is called only when the user scrolls using the thumb and store the Value of the TimeRuler horizontal ScrollBar.
3) Then in the RadGanttView_SelectionChanged event handler we can scroll the TimeRuler ScrollBar to the stored value from step 2.
This way visually it would appear as if no scroll is performed whatsoever.
Please find attached the modified project using this approach.
Hopefully this helps and is suitable for your scenario.
Regards,
Polya
Telerik
The sample project I sent is not fully implemented - I left the check when to scroll to the previous item to be implemented by you.
If, however the desired scenario is to disable scrolling on selection whatsoever I can suggest a better solution:
Internally the RadGanttView contains 3 ScrollBars - 2 horizontal ( for the GridView part and for the TimeRuler part ) and 1 vertical.
1) We can get these ScrollBars using the RadGanttView.ChildrenOfType<ScrollBar>() method.
2) Also we can handle the ScrollBar.Scroll event that is called only when the user scrolls using the thumb and store the Value of the TimeRuler horizontal ScrollBar.
3) Then in the RadGanttView_SelectionChanged event handler we can scroll the TimeRuler ScrollBar to the stored value from step 2.
This way visually it would appear as if no scroll is performed whatsoever.
Please find attached the modified project using this approach.
Hopefully this helps and is suitable for your scenario.
Regards,
Polya
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Marcus
Top achievements
Rank 2
answered on 27 Nov 2014, 02:43 PM
Hello Polya,
thank you for your tip. Now i can set the value of the horizontal scrollbar,
but i don't find the Scrollbar.Scroll Event i.e. to store the value when user is
scrolling through scrollbar.
Regards,
Richard
thank you for your tip. Now i can set the value of the horizontal scrollbar,
but i don't find the Scrollbar.Scroll Event i.e. to store the value when user is
scrolling through scrollbar.
Regards,
Richard
//???
private void Scroll_Changed(object sender, ScrollBar e)
{
var memo = e.Value;
}
private void gantt_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var gantt = sender as RadGanttView;
var scrBars = gantt.ChildrenOfType<
ScrollBar
>().ToArray();
if (scrBars.Length == 3)
{
var timeRulerAreaScrollbar = scrBars[1];
System.Diagnostics.Debug.WriteLine(timeRulerAreaScrollbar.Value.ToString());
timeRulerAreaScrollbar.Value = 0; // <= set to memo
}
}
0
Marcus
Top achievements
Rank 2
answered on 28 Nov 2014, 09:12 AM
Hello Polya,
i find it. Thank you for your help.
Regards,
Richard
i find it. Thank you for your help.
Regards,
Richard
0
Hello Richard,
We are glad you have managed to achieve the desired. If you have any other questions or concerns, please let us know.
Regards,
Kalin
Telerik
We are glad you have managed to achieve the desired. If you have any other questions or concerns, please let us know.
Regards,
Kalin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.