Checked nodes with no checked childrens don't show

7 posts, 0 answers
  1. Fernando
    Fernando avatar
    2 posts
    Member since:
    Dec 2008

    Posted 15 Dec 2008 Link to this post

    Hi all,

    I´m having some problems checking nodes of my RTV. My RTV has tri-state check boxs. Programatically I search for some nodes, using FindNodeByValue(number_of_my_node), and then if i'ts not null, set the node.Checked property to true.

    This works well for all nodes (node is show checked) except that ones that has children, but no one children is checked. In this case, the node it's shown unchecked, but if you get all checked values using CheckedNodes, the number_of_my_node is returned correctly.

    Can anyone help me with this issue.

    Thanks.

    Fer.


  2. Tim
    Tim avatar
    11 posts
    Member since:
    Dec 2007

    Posted 17 Dec 2008 Link to this post

    I can't offer a solution to this problem but we are also having the same problem when trying to check top level boxes that don't have any sub nodes checked.

    Tim
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 18 Dec 2008 Link to this post

    Hi guys,

    Thank you for reporting this.

    The parent node should not be checked in this case because its state depends on its children. Since there are no checked children - the parent will be shown as unchecked.

    We will research the cause of the problem with the CheckedNodes collection containing that parent node and fix it.

    Fernando, I have updated your Telerik Points.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Fernando
    Fernando avatar
    2 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    Hi guys,

    I've set the TriState property to false, and now it works. I've lost the indeterminate state, but my treeview is checked is I want.

    Anyway, I think there is a bug, cause eventhouth the parent node is show unchecked, the value of the checked property of the node is set to true.

    Thanks for all,

    Fernando.
  6. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 18 Dec 2008 Link to this post

    Hi Fernando,

    Actually, it is by design.

    We render the checked state (checked, unchecked, indeterminate) and not the Checked property.
    Since in your initial case the state of the parent node is unckecked (because all its children are unchecked) it is rendered as unchecked. The CheckedNodes collection contains all nodes which have their Checked property set to True.

    If you set the CheckChildNodes property to True, it will work as you want - but it will check all the children automatically.

    I hope that ti is clearer now.

    Kind regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Andrea
    Andrea avatar
    64 posts
    Member since:
    Jan 2005

    Posted 28 May 2009 Link to this post

    Hi,

    I think that the current behavior is wrong. Trough the web-interface I can check a parent node without checking its child nodes, then you must make this possible also trough server-side code.

     

    Best Regards
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 29 May 2009 Link to this post

    Hi Andrea,

    We will consider improving this behavior in a future release of RadTreeView.

    Kind regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017