onkami
onkami

Reputation: 9411

Disable/enable clientside all checkboxes in a Telerik RadTreeView

I need to disable all checkboxes that I have in telerik RadTree. How I could achieve that?

Trick is, these are not HTML controls but seem to be something imitating these via images, CSS and javascript. For instance, HTML for a RadTreeView node looks like:

  <div class="rtMid">
  <span class="rtSp"></span>
  <span class="rtMinus"></span>
  <span class="rtUnchecked"></span>
  <span class="rtIn">Item text</span>
  </div> 

Best, Askar

Upvotes: 0

Views: 943

Answers (1)

Francis P
Francis P

Reputation: 13655

Simply redefine its onclick javascript event so it doesn't fire.

This is supposed to work in every browser:

onclickEvent = "if (event.cancelable) {event.preventDefault();}else {event.returnValue = false;} return false;";

This is what I think is the best cross-browser solution:

onclickEvent = "this.checked = !this.checked;";

Upvotes: 1

Related Questions