This is a migrated thread and some comments may be shown as answers.

Expand Collapse

10 Answers 213 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 2
Guru asked on 18 Apr 2012, 04:18 PM
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.

10 Answers, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 19 Apr 2012, 07:53 AM
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 >>

0
Guru
Top achievements
Rank 2
answered on 19 Apr 2012, 05:43 PM
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.
0
Rosi
Telerik team
answered on 20 Apr 2012, 09:18 AM
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 >>

0
Matt
Top achievements
Rank 2
answered on 09 Jul 2012, 03:02 PM
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).
0
Guru
Top achievements
Rank 2
answered on 09 Jul 2012, 08:58 PM
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.
0
Matt
Top achievements
Rank 2
answered on 10 Jul 2012, 12:39 AM
It would also be fantastic to have deferred / async. loading capabilities like TreeListView does on expand.
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 10 Jul 2012, 10:57 AM
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 >>

0
Guru
Top achievements
Rank 2
answered on 10 Jul 2012, 05:56 PM
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.
0
SPARE GmbH
Top achievements
Rank 2
answered on 24 Jun 2013, 10:17 AM
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?
0
Vladi
Telerik team
answered on 25 Jun 2013, 09:56 AM
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.

Tags
GanttView
Asked by
Guru
Top achievements
Rank 2
Answers by
Rosi
Telerik team
Guru
Top achievements
Rank 2
Matt
Top achievements
Rank 2
Miroslav Nedyalkov
Telerik team
SPARE GmbH
Top achievements
Rank 2
Vladi
Telerik team
Share this question
or