RadiantQ Forum
Product => WPF Gantt Package => Topic started by: tim on October 29, 2020, 03:48:33 PM
-
Hello,
we have a FlexyGantt with OverlappedTasksRenderingOptimization="ShrinkHeight" and a RowHeigtConverter. So if some tasks overlap the row height increases.
The user can collapse a row of the gantt via a toggle button.
To do this, TaskListBinding is bound to a CollectionView of the task items and the CollectionView filters all tasks out, resulting in MaxOverlappingBlocksRowCount set to 1.
The problem is that when the user expands the row MaxOverlappingBlocksRowCount is still 1 and the row cannot be calculated with the correct height.
I looked into the code and when the filter of the CollectionView is changed the event OnItemsChanged() in ChartChildren class is fired.
else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset)
{
this.blocks.Clear();
}
this.UpdateMaxOverlappingTasksCount();
When this.UpdateMaxOverlappingTasksCount() is called, this.blocks is empty and results in MaxOverlappingBlocksRowCount set to 1. The same action is fired when the filter repopulates the CollectionView.
The Microsoft documentation for NotifyCollectionChangedAction.Reset states:
"The contents of the collection changed dramatically."
This means that a large change occurred in the collection and it should be reevaluated completely. This can be a Clear() but it can also be a changing filter.
For a test I added the items again (e.NewItems is null in this case):
else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset)
{
this.blocks.Clear();
//test: readd items
if (tasksPanel != null)
{
foreach (TaskItemControl child in tasksPanel.Children)
this.OnNewEntityAdded(child);
}
}
This solved my issue, all items get added again when the filter adds them.
Would be great if you could include this fix.
Best regards
-
Jan,
Thank you for your suggestion. We will consider your changes.
Thanks,
Raja.
-
Raja,
Thank you for the reply.
Please let me know, when the issue is fixed. We need it urgently.
Best regards
-
Jan,
The suggested code changes looks good but we are wondering when these changes might require. We are trying to reproduce the scenario, unfortunately we couldn't. Can you share the reference sample it will speed up the process.
Thanks,
Raja.
-
Raja,
I sent a link to a sample project on friday to support@radiantq.com.
Best regards
-
Jan,
We got your sample and we are concerned with the performance by including your changes. Anyway, we will test it thoroughly and provide you an update soon.
-
Raja,
thanks for the reply.
If performance of my change is an issue, maybe you can find a different way to fix it.
Best regards
-
Jan,
We are making slow but steady progress, will keep you updated.
-
Hello,
it's been nine weeks now since the initial post and four weeks since the last update :-( and we urgently need some improvement on this. We need a solution or at least a plan within the coming week.
Best regards
Jan
-
Hi Jan,
Due to Christmas and NewYear holidays delay is unavoidable. As we said earlier we made slow but steady progress and handled the scenario of refreshing(Filter) task view items. Currently, testing is on progress. We have to test thoroughly since the changes are in source level.
Hope you will get an updated version within a day or two.
Thanks
Raja
-
Hi Jan,
We have sent you the latest assembly to you in email. Please get it and let us know the status.
-
Raja,
we got the latest assembly and the issue is gone :)
Thank you.
Please also send uns the source code and samples for the latest version.
Best regards