Home : How can i set the Height of gantt_ASP, so that all rows just fit into the gantt-(border) ?
Q10540 - FAQ: How can i set the Height of gantt_ASP, so that all rows just fit into the gantt-(border) ?

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)

  {

 

    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;

    }

 

  }

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2006-04-25.
Last Modified on 2009-05-09.
Last Modified by Administrator.
Suggested by Robert Marti
Article has been viewed 746 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article