How to Convert X to Time and Time to X in the Chart?
Often you might want to convert an X location in the GanttChart to a DateTime value (based on the current time scale headers settings) and vice versa. This is easily done using the following methods in GanttChart:
// xPos is a x value in GanttChart co-ordinates
DateTime dt = this.ganttControl.GanttChart.ConvertXToTime(xPos);
// xPos is a x value in GanttChart co-ordinates
double xValue = this.ganttControl.GanttChart.ConvertTimeToX(aDateTime);
To expand all / collapse all tasks, in the GanttControl, use the GanttControl.ExpandAll and GanttControl.CollapseAll methods.
� RadiantQ 2009 - 2019. All Rights Reserved.