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

Set scrollbar on same position after update data

1 Answer 122 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
dragan
Top achievements
Rank 1
dragan asked on 10 Dec 2019, 11:11 AM

So after i update data, gantt resets the position to the starting position, and i want to remain the same position

how to do that ?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Dec 2019, 09:07 AM
Hello, Dragan, 

The GanttViewElement.GraphicalViewElement offers the ScrollTo method accepting a DateTime value to which you want to scroll. If you need to keep the position of the horizontal scrollbar before updating the graphical view and restore its value later, please refer to the following code snippet: 
            var scrollVaue = this.radGanttView1.GanttViewElement.GraphicalViewElement.HorizontalScrollBarElement .Value;
            this.radGanttView1.GanttViewElement.GraphicalViewElement.Update(RadGanttViewElement.UpdateActions.Reset);
            this.radGanttView1.GanttViewElement.GraphicalViewElement.HorizontalScrollBarElement.Value = scrollVaue;
I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GanttView
Asked by
dragan
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or