GanttView grid and child tasks with different column headers

4 posts, 0 answers
  1. Stuart
    Stuart avatar
    10 posts
    Member since:
    Feb 2013

    Posted 05 Jul 2013 Link to this post

    Hi,

    Is it possible to have child tasks display in the grid on the GanttView with different columns/headers than the parent task, whilst still displaying normally on the time line portion of the control?

    thanks
  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 08 Jul 2013 Link to this post

    Hello Stuart,

    You could create a custom GanttTask which will have custom properties and each property will be set differently for the parent and child tasks. In other words you could set a value for a property which should be displayed in each summary task and null for all his child tasks. You could see the result in the attached sample project. If you need to display the cells in the columns differently for parent/child tasks you could use the CellTemplate property of the ColumnDefinition class.

    Hope this helps.

    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Stuart
    Stuart avatar
    10 posts
    Member since:
    Feb 2013

    Posted 10 Jul 2013 Link to this post

    Hi, thanks for the response,

    The sample you provided isn't exactly what I need. The second scenario where I need to display the cells in the columns differently for parent/child tasks is the one I need, however, I am struggling with creating a CellTemplate to do what you say is possible.

    The child tasks have Start/End dates, but have different data that should be displayed in the grid than the parent. Essentially it's master/detail where the relationship is keyed off an id field. In my custom GanttTask I've got properties for everything I need to see when the GanttTask is a parent, or when it's a child.

    Something like:

    Parent Col Name 1 | Parent Col Name 2 | Parent Col Name 3
      Some data      | Some other data   | Some more data
        -> Child Col Name 1 | Child Col Name 2      | Child Col Name3
         Different data     | Different Other Data | More different data
    Parent Col Name 1 | Parent Col Name 2 | Parent Col Name 3
      Some data      | Some other data   | Some more data
        -> Child Col Name 1 | Child Col Name 2      | Child Col Name3
         Different data     | Different Other Data | More different data
    Parent Col Name 1 | Parent Col Name 2 | Parent Col Name 3
      Some data      | Some other data   | Some more data
        -> Child Col Name 1 | Child Col Name 2      | Child Col Name3
         Different data     | Different Other Data | More different data

    As I say, I'm just struggling with getting the CellTemplate to work.

    -stuart
  5. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 11 Jul 2013 Link to this post

    Hello Stuart,

    I am sorry for the misunderstanding. I've meant with "display the cells in the columns differently" that you could set different style for the different cells and not displaying different data. Each column of the Grid section of the RadGanttView should display the value of one property of the GanttTask independently this task is parent or child. This is done by the MemberBinding property of the ColumnDefinition. This is the reason why this particular scenario cannot be achieved in RadGanttView.

    We are sorry for the inconvenience caused.

    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top