How to disable checkbox in treeview programmatically?

4 posts, 0 answers
  1. Abhishek Gairola
    Abhishek Gairola avatar
    20 posts
    Member since:
    Apr 2010

    Posted 02 Jul 2010 Link to this post

    Hello friends

    I would like to disable the checkbox in my radtreeview, but currently I do not find any property for this.
    If I am wrong please name the property.

    If not then please suggest a wayto do it or any alternative options.

    I want to disable checkbox on click on a button and then enable them on click of another button.

    Thank you!
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1508 posts

    Posted 07 Jul 2010 Link to this post

    Hi Abhishek,

    There is no straightforward approach to this scenario. You will have to find the CheckBox in the visual tree of the TreeViewItem and disable/enable it. I've prepared a simple solution demonstrating one possible solution to this scenario. Have a look at it and let me know if it helps.

    On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit

    Kiril Stanoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. David Cardona
    David Cardona avatar
    20 posts
    Member since:
    Mar 2010

    Posted 16 Feb 2011 Link to this post

    Hello Kiril.

    I have just implemented your example but I have a error in this line

    Panel rootPanel = VisualTreeHelper.GetChild(rtvi, 0) as Panel;

    The error is: System.ArgumentOutOfRangeException 

    Can you help me?

  5. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 21 Feb 2011 Link to this post

    Hi David Cardona,

    You could  provide a runnable sample and we will try to investigate your issue in depth. Is your tree bound to a collection of objects ? Can you make sure that you are trying to work with a RadTreeViewItem that is already generated ( usually it happens when it is loaded in the tree root level collection or one of its parent item has been expanded so that the needed item becomes visible. You can find more info on this topic here. Thank you for your cooperation in advance.

    All the best,
    Petar Mladenov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top