Question
I use a gantt in my ASP.NET project:
The poperties UseExpandedRowHeights and CollisionDetectionSyncron are set to true, so that my rows have different sizes.
How can i set the Height of the gantt, so that all rows just fit into the gantt-(border) ?
Answer
You will need to load the data, then iterate the rows in Gantt_ASP.Gantt.Grid.GridStructure and sum up the heights. You will need to add the DateScaler height as well. Then set this value as the control height.
Update; this code will solve this:
protected void Gantt_ASP1_OnClientSideChangesApplied(object sender, EventArgs e)< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
{
Gantt_ASP1.Gantt.Grid.Refresh();
Gantt_ASP1.Gantt.TimeItemArea.Refresh();
if (Gantt_ASP1.Gantt.Grid.GridStructure.LastDrawnNode != null)
{
Gantt_ASP1.Height = Gantt_ASP1.Gantt.Grid.GridStructure.LastDrawnNode.Rect().Bottom + Gantt_ASP1.Gantt.DateScalerHeight;
}
}