CheckedItems is null

3 posts, 0 answers
  1. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 10 Jun 2010 Link to this post

    Hi,
    I'm using TreeView with the checkbox enabled

    <telerik:RadTreeView MinWidth="150"  
                                         IsLineEnabled="True"  
                                         ItemsOptionListType="CheckList"  
                                         x:Name="leftTree"  
                                         IsTriStateMode="True"  
                                         IsOptionElementsEnabled="True"  
                                         ItemTemplate="{StaticResource dataTemplate}"/> 

    So the basic usage:
    The treeview has no checked items to begin with and is collapsed. The user should be able to check the top item.

    So the problem is that I cannot iterate through the checked item collection when the tree is collapsed because the items do not exist.
    Is there any way to have the items created so I can iterate through them without expending the tree.

    Best regards
    Kristján.
  2. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 15 Jun 2010 Link to this post

    anyone ?
  3. UI for WPF is Visual Studio 2017 Ready
  4. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 15 Jun 2010 Link to this post

    Hello Kristjan Einarsson,

    As you said you can't iterate through the item containers because they are still not generated.

    Can you elaborate a little bit more on the problem you are trying to solve? Basically the correct implementation will be if you think of the TreeView only as a View of your data model, and to iterate not the generated treeview items, but the business objects that are used for the treeview population. This way you will have access to all the items - not only to generated containers.

    Kind 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.
Back to Top