Expand Collapse

11 posts, 2 answers
  1. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 18 Apr 2012 Link to this post

    Can you tell us what programmatic access thee is to expanding and collapsing tasks? I can't find this anywhere in your documentation or api.
  2. Answer
    Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 19 Apr 2012 Link to this post

    Hi,

    The current version of RadGanttView does not support public API that you can use to implement the task. We are sorry for the inconvenience caused.
    This feature will be included when RadGanttView becomes official by the end of the year.

    Kind regards,
    Rosi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 19 Apr 2012 Link to this post

    Ok good, thanks.
    I would also like to see the ganttview work with the different themes as I am finding it is the one control in our entire application that you can't read and looks out of place if the user select certain themes, especially expression_dark, but this is off topic, I will try to find a submission for this topic.
  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 20 Apr 2012 Link to this post

    Hi,

    All missing themes of RadGanttView  will be included in our Q2 2012 release by the end of June.

    All the best,
    Rosi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Matt
    Matt avatar
    24 posts
    Member since:
    Sep 2009

    Posted 09 Jul 2012 Link to this post

    It would also be helpful to have a property allowing you to ask the Gantt chart to start in a collapsed state or methods to expand or collapse to certain levels (though the latter could be coded in).
  7. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 09 Jul 2012 Link to this post

    I have switched to implicit styling and all themes work great with the ganttview now!
    Looking forward to it having expand/collapse methods, is it still estimated to be in 2012?

    Also if there is programmatic way I can start collapsed or somehow collapse nodes through code it would be really nice... we have a first version including a ganttview and we would like to put it in use but the user is faced with many nodes expanded and it is overwhelming them in test.
  8. Matt
    Matt avatar
    24 posts
    Member since:
    Sep 2009

    Posted 09 Jul 2012 Link to this post

    It would also be fantastic to have deferred / async. loading capabilities like TreeListView does on expand.
  9. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 10 Jul 2012 Link to this post

    Hello Zack, Matt,

    We are planning to add the expand/collapse API for the 2012 Q3 release, but the loading on expand might not be ready for this time frame (it is planned for later release).

    Hope this information is helpful.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 10 Jul 2012 Link to this post

    Very helpful, thank you! Just glad to simply be able to expand/collapse... I'm sure lots of nice other features will come over time but not being able to do it at all is kind of a problem for us, so thanks glad to hear it is coming soon.
  11. SPARE GmbH
    SPARE GmbH avatar
    18 posts
    Member since:
    Mar 2012

    Posted 24 Jun 2013 Link to this post

    Hi,

    I want to expand / collapse GanttTasks from code as well.

    In the Changes list for the GanttView expanding isn't mentioned, and it is not in the documentary either, so I'm wondering, does the collapse API exist yet? If so, how can it be used?
  12. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 25 Jun 2013 Link to this post

    Hello,

    In order to expand/collapse a GanttTasks via the code behind all you need to do is use the built-in ExpandCollapseService of the control.

    The next code snippet shows how to use this service:
    <StackPanel DataContext="{StaticResource ViewModel}">
        <Button Content="Collapse" x:Name="Collapse" Click="Collapse_Click" Margin="10"/>
        <Button Content="Expand" x:Name="Expand" Click="Expand_Click" Margin="10"/>
        <telerik:RadGanttView TasksSource="{Binding Tasks}" Margin="20"
                                VerticalAlignment="Top"
                                x:Name="GanttView"
                                VisibleRange="{Binding VisibleTime}"
                                Height="200">
            <telerik:RadGanttView.Columns>
                <telerik:TreeColumnDefinition Header="Title" MemberBinding="{Binding Title}" Width="AutoHeaderAndContent"/>
                <telerik:ColumnDefinition MemberBinding="{Binding Start}" Header="Start" Width="AutoHeaderAndContent"/>
                <telerik:ColumnDefinition MemberBinding="{Binding End}" Header="End" Width="AutoHeaderAndContent"/>
            </telerik:RadGanttView.Columns>
        </telerik:RadGanttView>
    </StackPanel>

    and in the code behind:
    private void Collapse_Click(object sender, RoutedEventArgs e)
    {
        var firstTask = (this.GanttView.TasksSource as IList<GanttTask>)[0];
        this.GanttView.ExpandCollapseService.CollapseItem(firstTask);
    }
     
    private void Expand_Click(object sender, RoutedEventArgs e)
    {
        var firstTask = (this.GanttView.TasksSource as IList<GanttTask>)[0];
        this.GanttView.ExpandCollapseService.ExpandItem(firstTask);
    }

    Hope this is helpful.

    Regards,
    Vladi
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready