RadTreeView: disable checkboxes

2 posts, 0 answers
  1. Adrian Rotaru
    Adrian Rotaru avatar
    1 posts
    Member since:
    Jul 2009

    Posted 02 Aug 2013 Link to this post

    Hello

    For certain items in a RadTreeView I need to disable the associated checkbox. I need to display it but I don't want the user to be able to change its state. The rest of the functionality is needed: if a child node is selected I need the parent node to reflect this even if its checkbox is disabled. Also the collapse/expand functionality is needed and so on...
    In WinForms version I learned that there is an event named NodeFormatting that might help but Silverlight seems to miss this one.

    Thanks.
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 07 Aug 2013 Link to this post

    Hi Adrian,

    In order to achieve your requirement you can implement an MVVM approach in your application. Furthermore, you will be able to define a HierarchicalDataTemplate with a CheckBox inside and bind its IsChecked property to property defined in your ViewModel. Also, in order to disable it, you can set its IsEnabled property to False.

    You can refer to this article where we used similar HierarchicalDataTemplate and custom check/uncheck logic. Please give this approach a try and let us know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top