Please start using our more robust New Forum, we have put this old forum in archive mode. Thanks.


Welcome Guest Search | Active Topics | Log In

Tag as favorite
GanttControl height change
eitan.torf
#1 Posted : Wednesday, December 19, 2012 9:09:35 AM

Posts: 7

Hi,

I am using a ganttControl with no maximum height.
on first load, I have a lot of tasks, after a user filters the data and I update the gantt accordingly - there are fewer tasks but the gantt height stays as high as before.
Is there any way to refresh the gantt height according to its data?

See image below

Thanks

Eitan
Bala - RadiantQ
#2 Posted : Thursday, December 20, 2012 8:21:21 AM

Posts: 393

eitan.torf,

Could you please send a sample which represents this requirement, so that we can figure out how to fix this ?
Bala,
RadiantQ
eitan.torf
#3 Posted : Wednesday, January 02, 2013 6:07:44 AM

Posts: 7

I will rephrase my question -

I want the height of the entire gantt control to adjust to its number of tasks.
I dont want vertical scroll on gantt - if it has few tasks than its height should be small but if it has a lot of tasks - the height should be big.

you can look at your sample - PerformenceTestSample - I want the change of number of rows to affect the gantt's height.

Thanks,

Eitan
Bala - RadiantQ
#4 Posted : Wednesday, January 02, 2013 8:17:26 AM

Posts: 393

eitan.torf,

You can do something like this, to update the Gantt height based on number of tasks, make sure to call when the task add/remove happens.
Code:

void UpdateGanttHeight()
{
    GanttChart chart = this.ganttControl.GanttChart;   
    double height = (this.ganttControl.Items.Count * this.ganttControl.RowHeight) + this.ganttControl.GanttChart.TimeSpanHeaders.ActualHeight + (chart.ActualHeight-chart.ScrollViewerElement.ExtentHeight);
    if (this.ganttControl.Height != height)
        this.ganttControl.Height = height;
}
Bala,
RadiantQ
eitan.torf
#5 Posted : Sunday, April 28, 2013 7:54:27 AM

Posts: 7

This worked for me, until I used it on a gantt with summary tasks.
Two new problems:

- Once i set the ganttChart height, the expanding of a summary task does not make the gantt bigger as it used to.

- Setting the height according to the number of tasks is not good since most of the tasks are not visible when summary tasks are collapsed.

Thanks,
Eitan
Bala - RadiantQ
#6 Posted : Monday, April 29, 2013 5:54:09 AM

Posts: 393

Eithan,

Take a look at this post. You can update the gantt height in ActivityViews.CollectionChanged, and use
ActivityViews.Count instead of this.ganttControl.Items.Count
Bala,
RadiantQ
张萧
#7 Posted : Wednesday, November 01, 2017 4:03:10 AM

Posts: 1
Location: china

forget the name. The skin pandora jewelry uk is like tooth longitu pandora jewelry uk dinal parallel lines. do not the big bang theory season 10 dvd contact with harmful substances. earrings, Buy the bag back after maintenance the big bang theory season 10 dvd can not fjallraven mini backpack be ignored, too heavy items will caus fjallraven mini backpack e a certain impact on
Q4SQVVra5B
#8 Posted : Wednesday, November 01, 2017 6:57:20 AM

Posts: 1
Location: china

KFC, 3 dinner at noon with alm Gioielli Pandora Sito Ufficiale ost all t imitation cartier bracelets he same: a small amount of food or Gioielli Pandora Sito Ufficiale polenta + some light vegetables (after a imitation cartier bracelets meal to ea van cleef replicas t some fruit) 4 weight loss during the Jichi all snacks and high sugar high fat and oil what is best to eat. 3 boil
Tag as favorite
Forum Jump  
Please Email support@radiantq.com for any issues

ugg boots outlet cheap ugg sale ugg boots clearance ugg boots sale ugg boots cheap ugg boots for women uggs for cheap ugg shops cheap ugg boots cheap uggs Official Ugg Outlet ugg Store Buy Cheap UGGs ugg boots uk ugg boots usa ugg Online uggs on sale ugg outlets cheap ugg boot Discount UGG Boots discount uggs