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!
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 requirementtree.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.
Thank you, Bhadresh!
But if I disable checkboxes on the client side should I do the same each time when node is checked ?
And could you please look at this problem:
http://community.infragistics.com/forums/p/61086/326702.aspx#326702
You can disable node on the server side using below line of code:
this.WebDataTree1.Nodes[0].Enabled = false;
The code provided in my previous reply sets the image for checkboxes based on the node state. You can iterate through nodes and set image based on the code provided above. When node is disabled the checkbox also stops editing so it is not needed to handle any other event to implement this.
I am just following up to see if you need any further assistance with this matter.
Hi, Bhadresh!
No, I don't need any further assistance, thank you.
Alexander