Discuss anything related to web development but no technical support questions


Post by Maxim Gorkovsky »

Hello.
There are two options.
Option A:
1) Load tree structure like you do now - milestones as children with rollup=true
2) Filter tree right after it is loaded. That way view will not contain filtered nodes (as well as they will not be accessible with store.getById), but they will still be reachable using 'childNodes' property on parent task
3) Modify 'getRollupRenderData' method on Gnt.view.Gantt and traverse child nodes of the 1-st level parent task using childNodes property, gathering all tasks that should be displayed as rollups. You can hide parent task using CSS then

Option B:
1) Provide 'getRowClass' method to both normal and locked view. That method should return class, that will be added to miletones, that you want to hide.
2) Use CSS to hide such rows (via height, or display: none, see what works better)
3) override 'getItemBox' on Gnt.view.Gantt and return false for tasks that you want to hide:
Ext.define(null, {
  override : 'Gnt.view.Gantt',
  getItemBox : function (record) {
    if (!record.isMilestone()) { return this.callParent(arguments) }
  }
});
4) Same as on step 3 in previous approach

As you see, approaches differ only on the matter how exactly to hide rows: in first case they are not rendered completely, in 2nd they are rendered but hidden. Given that filtering can bring surprises, you should probably stick to approach B.

If you still struggle implementing this, you can hire us to do it. It should take only few hours. In such case, please contact sales at bryntum.com for a quote

Post by mats »

Rollup tasks work as they typically do in regular PM software, you mark tasks as Rollup in the data and they are then rolled up to their immediate parent. It sounds like you need to override the way we render Rollups and only show them for the topmost root node. Look at our 'getRollupRenderData' method, then override it in your custom Gantt class.

Post Reply