CheckedItems only return root item

5 posts, 1 answers
  1. question_forum
    question_forum avatar
    5 posts
    Member since:
    Dec 2009

    Posted 07 Jan 2010 Link to this post

    Hi,

    I'm using RadTreeView control for WPF Q2 2009, with values

    IsOptionElementsEnabled

     

    ="True"  

     

    ItemsOptionListType="CheckList"  

     

    IsTriStateMode="True"

    the treeview is collapsed. If i check first root item but not expand the node, CheckedItems only return one item. Otherwise if I expand the node, CheckedItems returns the root item node and subitems.

    Is there any option to avoid that?

    This is the example:

     

    <telerik:RadTreeView   
                IsLineEnabled="True"   
                IsOptionElementsEnabled="True" 
                ItemsOptionListType="CheckList"    
                IsTriStateMode="True" 
                IsRootLinesEnabled="True"    
     
                controls:StyleManager.Theme="Vista" 
            > 
                <telerik:RadTreeViewItem Header="Item0">  
                    <telerik:RadTreeViewItem Header="Item1.1"/>  
                    <telerik:RadTreeViewItem Header="Item1.2"/>  
                </telerik:RadTreeViewItem> 
                <telerik:RadTreeViewItem Header="Item1">  
                    <telerik:RadTreeViewItem Header="Item1.1"/>  
                    <telerik:RadTreeViewItem Header="Item1.2"/>  
                </telerik:RadTreeViewItem> 
                <telerik:RadTreeViewItem Header="Item2">  
                    <telerik:RadTreeViewItem Header="Item1.1"/>  
                    <telerik:RadTreeViewItem Header="Item1.2"/>  
                </telerik:RadTreeViewItem> 
     
            </telerik:RadTreeView> 

    When I check node Item0 but not expand it, CheckedItems returns Item 0 only (this happens only the first time node is collapsed)
    But expanding it, CheckedItems returns Item 0, Item1.1, Item1.2. (if i collapsed the node again, CheckedItems returns Item 0, Item1.1, Item1.2)

     

    Also I set theme to Vista (controls:

    StyleManager.Theme="Vista" ) but I get an orange backgound when mouse is over the nodes. Is this ok?

    Thanks and best regards,
    Alberto

     

     

  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 08 Jan 2010 Link to this post

    Hi question_forum,

    This is the expected bevahior. It is actin like that because the collapsed items are still not generated. Once you expand them - they will fire the Expanded event also.

    Regards,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
  4. question_forum
    question_forum avatar
    5 posts
    Member since:
    Dec 2009

    Posted 11 Jan 2010 Link to this post

    Hi Valentin,

    Is there any way to expand all nodes at start? In XAML or code-behind (I prefer in XAML)?

    Thanks for the response.
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 11 Jan 2010 Link to this post

    Hello question_forum,

    Yes - check this article:
    http://www.beacosta.com/blog/?p=54

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. question_forum
    question_forum avatar
    5 posts
    Member since:
    Dec 2009

    Posted 11 Jan 2010 Link to this post

    Thanks a lot.

    Best regards
Back to Top
UI for WPF is Visual Studio 2017 Ready