BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
public static class GanttControlExtensions { public static void ScrollToItem(this GanttControl gantt, object item) { gantt.SelectedItems.Clear(); gantt.SelectedItems.Add(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)); } }
Hi Nick,
We are currently analyzing on any workaround feasibility for
requirement. Hence, We will update by tomorrow
Regards,
Suresh S
Hi Nick,
Please ignore our previous update.
We have prepared a sample to bring specific record into
view, please download from below location.
CodeSnippet:
RowColumnIndex rowcolumnindex = new RowColumnIndex();
rowcolumnindex.RowIndex = Convert.ToInt16(txtbox.Text);
this.GanttControl.GanttGrid.Model.TreeGrid.ScrollInView(rowcolumnindex);
this.GanttControl.GanttGrid.Model.TreeGrid.CurrentCell.MoveTo(rowcolumnindex);
Note:
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.
Regards,
Suresh S