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
1923
WebTree CSOM Documentation and Node Object's setChecked
posted

In the documentation for the UltraWebTree's Node object, the setChecked function is not listed as having a second parameter which is a boolean of whether to allow or cancel further CSOM events.

If you use node.setChecked(true) in the javascript etc it will fire the NodeChecked event. In my code, I was updating a dataset via ajax in the NodeChecked event, if the update failed, it would set the checked status back to the original which would fire the event again, thus creating an infinite loop. I checked the documentation and it didn't mention that there was a cancel CSOM events parameter (like the setValue for other things often has)...

So you can use this node.setChecked(false,false); // clears the checkbox and cancels the csom event

Only after interrogating the code did I determine that it actually does have this parameter...so anyway, the documentation (including the latest online) does not mention this...hopefully useful for anyone else out there...saves having a "status" global variable!

-- will mark as answered when it gets added to the documentation...