Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
How to get values is javascript and c# for saving/retrieving.
posted

Hello,

Once again, the documentation doesn't seem to cover yet another thing I'm trying to use infragistics controls for. I have a WebDataTree on my page. The tree has 3 levels which are Region, Division, Products. What i would like to know is the following:

1. how to get which nodes are checked and which nodes are partial checked as well as the level of the item which was partial or fully checked via JavaScript.


2. how to set which nodes are checked and which nodes are partial checked via C#. Is it possible to just check the 3rd level and have the control automatically put a partial or full check on the other two levels?

 

Parents
  • 7566
    Suggested Answer
    posted

    Hi Shane,

     

    Probably you are using this declaration CheckBoxMode="TriState"

    You can select a node and if all the child nodes of any node are selected it will be fully selected , if no it will be partially selected in case one of them is selected. On the client we can access the collection with the nodes that are fully selected like this:

    sender.get_checkedNodes()

    And for example if you handle a selection changed or any other client side event  you can check the state of the checkbox of the node like this:

    eventArgs.getNewSelectedNodes()[0].get_checkState()

    and to set it like this:

    eventArgs.getNewSelectedNodes()[0].set_checkState()

     

    Also when you get any of the nodes

    You can call get_level() function that will return the level of the node.

     

    On the server you can change the node state like this:

    this.WebDataTree1.Nodes[1].CheckState = Infragistics.Web.UI.CheckBoxState.Partial;

     

     

    For any further questions do not hesitate to contact us.

     

    Sincerely,

    Georgi Sashev

    Developer Support Engineer

    Infragistics, Inc.

    http://es.infragistics.com/support

Reply Children
No Data