ItemContainerGenerator returns null when item is collapsed

4 posts, 0 answers
  1. Lauren Nickerson
    Lauren Nickerson avatar
    52 posts
    Member since:
    Jul 2009

    Posted 07 Apr 2010 Link to this post

    As the title says, the item exists within the RadTreeViewItem.Items, yet it returns null, even when searching by index, see the following screen shot:


    The RadTreeView is data bound using several HierarchyDataTemplates, I tried this with regular items like so:

            <telerik:RadTreeView> 
                <telerik:RadTreeViewItem x:Name="firstTelerikItem" Header="Item 1" IsExpanded="True"
                    <telerik:RadTreeViewItem Header="Item 1.1" x:Name="containerTelerik1_1" /> 
                    <telerik:RadTreeViewItem Header="Item 1.2" x:Name="containerTelerik1_2" /> 
                    <telerik:RadTreeViewItem Header="Item 1.3" x:Name="containerTelerik1_3" /> 
                </telerik:RadTreeViewItem> 
                <telerik:RadTreeViewItem Header="Item 2" /> 
                <telerik:RadTreeViewItem Header="Item 3" /> 
            </telerik:RadTreeView> 

    And in there it works fine, but not with the databound ones.

    Lmk, thanks!
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 08 Apr 2010 Link to this post

    Hi Lauren Nickerson,

    Yes - this is the expected behavior - the container is not used and is null.

    Regards,
    Valentin.Stoychev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Lauren Nickerson
    Lauren Nickerson avatar
    52 posts
    Member since:
    Jul 2009

    Posted 08 Apr 2010 Link to this post

    I see, is there any work around to get the container when the parent item is collapsed?
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 12 Apr 2010 Link to this post

    Hello Lauren Nickerson,

    You can't get the container beucase it do not exist. Please let us know what is your scenario so we can give you some advise.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top