Determine part-checked node on click

3 posts, 0 answers
  1. David
    David avatar
    286 posts
    Member since:
    Mar 2014

    Posted 24 Aug 2018 Link to this post

    For tri-state TreeView i am trying to check state of 'parent' node.

    I tried get_checked() function, but it returns true for both checked and part-checked items

    Here is the code just in case:

    function rddtRegion_OnClientNodeChecking(sender, args) {

             var region_node = args.get_node();

             if (region_node.get_value().includes('000')) {      // PARENT NODE CHECK

                  if (region_node.get_checked()) {        

     Thank you

       

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    654 posts

    Posted 28 Aug 2018 Link to this post

    Hello David,

    The TreeNode client-side object has a .get_checkState() method which can be used to determine the exact state of the node: https://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/client-side-programming/objects/radtreenode;

    get_checkState none Telerik.Web.UI.TreeNodeCheckState Returns the current check state of a node. It can be one of the following:
    - Telerik.Web.UI.TreeNodeCheckState.Unchecked(i.e. 0);
    - Telerik.Web.UI.TreeNodeCheckState.Checked(i.e. 1);
    - Telerik.Web.UI.TreeNodeCheckState.Indeterminate(i.e. 2);


    Regards,
    Peter Milchev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. David
    David avatar
    286 posts
    Member since:
    Mar 2014

    Posted 28 Aug 2018 in reply to Peter Milchev Link to this post

    Oh, i missed that one

    Thank you

Back to Top