RadTreeListView: AutoExpandItems is getting ignored

4 posts, 0 answers
  1. caleb
    caleb avatar
    30 posts
    Member since:
    Sep 2011

    Posted 03 Oct Link to this post

    Hello there,

    I've got version 2016.2.613.1050 of the Telerik Silverlight controls.  I've got a RadTreeListView

    <telerik:RadTreeListView
        x:Name="GridView"
        DataLoadMode="Asynchronous"
        IsExpandableBinding="{Binding IsFolder}"
        AutoExpandItems="False"
        AutoExpandGroups="False"
        AutoLoadHierarchy="False"
        RowIsExpandedChanged="GridView_OnRowIsExpandedChanged"
        BorderThickness="0"
        VerticalAlignment="Top"
        ScrollViewer.VerticalScrollBarVisibility="Visible"
        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
        Sorted="GridView_OnSorted"
        Width="{Binding Source={StaticResource VAR}, Path=ViewAreaWidthInside}"
        Height="{Binding Source={StaticResource VAR}, Path=ViewAreaHeightWithOffset}"
        CanUserFreezeColumns="False"
        IsReadOnly="False"
        RowIndicatorVisibility="Collapsed"
        Background="{Binding Source={StaticResource VAR-New},Path=VAR}"
        VirtualizingStackPanel.VirtualizationMode="Recycling"
        AutoGenerateColumns="False"
        engine:TreeViewDragDropBehavior.IsEnabled="True"
        IsDragDropEnabled="True"
        IsDragTooltipEnabled="False"
        CanUserDeleteRows="False"
        DragCueItemTemplate="{StaticResource FirstColumnCellTemplate}"
        Style="{StaticResource RadTreeListViewStyle1}"
        CellEditEnded="GridView_OnCellEditEnded"
        EnableColumnVirtualization="True"
        EnableRowVirtualization="True"
        MouseRightButtonDown="GridView_OnMouseRightButtonDown"
        Loaded="GridView_OnLoaded"
        Unloaded="GridView_OnUnLoaded"
    >
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition
        ItemsSource="{Binding Items}"
    />
    </telerik:RadTreeListView.ChildTableDefinitions>
    </telerik:RadTreeListView>

    So I would assume that the expander rows would not auto expand.  However when I run this code that's exactly what happens.  The auto expanders appear to be ignoring the false property and expanding. 

    How do I get this to work?  What I want to happen is each expander row to stay closed and expand as the user selects them.  I reviewed the .xaml.cs and there's no code there that is setting the expander property.

    Cheers,

     

    Caleb

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    370 posts

    Posted 05 Oct Link to this post

    Hello,

    I tried to reproduce the behavior you've described in a sample project, but was, unfortunately, unable to do so. Could you please have a look at the attached project and let me know if I've missed something of importance?

    It would really be of help if you could also provide the code-behind where you've handled RadTreeListView's events.

    Thank you in advance for your cooperation on the matter. I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
  4. caleb
    caleb avatar
    30 posts
    Member since:
    Sep 2011

    Posted 05 Oct in reply to Dilyan Traykov Link to this post

    Hello there,

     

    I'm not able to get the supplied bit of code to compile.  VS 2012 can't seem to resolve the Telerik bits.  Anyways.  I'm not sure this is a good example.  The issue that I have is that I have a collection of data each piece of data is either a folder or a file.  The folders might have children, the files certainly don't.  I don't see how that is modeled in the .xaml that you sent me.  Can you modify your example to work with the above scenario?

    Thanks,

    Caleb

  5. caleb
    caleb avatar
    30 posts
    Member since:
    Sep 2011

    Posted 05 Oct in reply to caleb Link to this post

    Mate!

     

    I had an attached behavior that was causing this problem.  The OnLoaded method was calling ExpandAllHierarchyItems();

     

    Thanks,

     

    Caleb

Back to Top