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
1250
Disable checkbox if node is disabled
posted

Hi,

I use WebDataTree, CheckBoxMode == CheckBoxMode.BiState

When I disable any node the text of this node becomes grey, that fine.

But the checkbox remains the same (not grey).

Please explain me how I can display checkbox as disabled when node is disabled?

I see that there is css class igdt_NodeDisabled, but  for some reason it is rendered only on anchor element. Following html represents the single node, the image I want to make disabled one.

<li class="igdt_NodeHolder">

<img id="x:419080887.5:mkr:check" alt="" src="ig_checkbox_off.gif" complete="complete"/>

<a  class="igdt_Node igdt_NodeDisabled" id="x:419080887.6:mkr:dtnContent" >

<li/>

Please help!

Parents
No Data
Reply
  • 8736
    posted

    Hello AlexanderZh,

    In order to implement the functionality you described, I would suggest you to handle “Initialize” event of WebDataTree and set image of the disabled node as shown below:


    function WebDataTree1_Initialize(sender, eventArgs)
    {
    if (document.readyState == "complete") {
    var tree = $find("WebDataTree1");
    if (tree.getNodes().getNode(0).get_enabled() == false) {
    //Change image based on you requirement
    tree.getNodes().getNode(0)._get_checkBox().get_element().src = 'ig_res/Default/images/ig_checkbox_disable.gif';
    }
    }

    You may change the image name and image path based on you requirement.

    I hope this helps.

Children