We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bring a specific row into view

Thread ID:





119303 Jun 3,2015 03:02 PM UTC Jun 10,2015 01:03 PM UTC WPF 4
Tags: GanttControl
Nick Verschueren
Asked On June 3, 2015 03:02 PM UTC

In our project a Gantt can have hunderds to even a few thousand resources shown as rows.
Is there a way to scroll to a specific row from code, either by index or by the bound item?

Nick Verschueren
Replied On June 4, 2015 09:33 AM UTC

Meanwhile I found the following workaround for this, but I would appreciate a better solution if anybody has one.

public static class GanttControlExtensions
  public static void ScrollToItem(this GanttControl gantt, object item)
    var idx = gantt.Model.GetRowIndexFromItem(item);
    var border = VisualTreeHelper.GetChild(gantt.GanttGrid, 0);
    var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
    scrollViewer.ScrollToVerticalOffset(Math.Max((idx - 1) * gantt.RowHeight, 0));

Suresh S [Syncfusion]
Replied On June 4, 2015 01:40 PM UTC

Hi Nick,

We are currently analyzing on any workaround feasibility for requirement. Hence, We will update by tomorrow


Suresh S

Suresh S [Syncfusion]
Replied On June 5, 2015 01:08 PM UTC

Hi Nick,

We have analyzed your query and achieved your requirement of bringing specific record in to view. We have prepared a sample based on this, please download from below location,

Let us know in case of any query.

Suresh S

Attachment: GridTreeControl_Sample_5a91decc.zip

Suresh S [Syncfusion]
Replied On June 10, 2015 01:03 PM UTC

Hi Nick,

Please ignore our previous update.

We have prepared a sample to bring specific record into view, please download from below location.


RowColumnIndex rowcolumnindex = new RowColumnIndex();

            rowcolumnindex.RowIndex = Convert.ToInt16(txtbox.Text);




In the sample, when the ganttcontrol is loaded, initially a specific row should be selected and then we can input the row index in the user option to bring the record into view.

Please let us know in case of any query.


Suresh S

Attachment: GanttControl_6404e168.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon