Ticket T202617
Visible to All Users

How to make child nodes read-only if their parent node is checked

created 10 years ago (modified 10 years ago)

[DevExpress Support Team: CLONED FROM T202180: How to to make child nodes non editable or not expandable]
I have another question ?
If I check the checkbox of  parent node then it should <…> make it Editable false.
How to do this ?

Answers approved by DevExpress Support

created 10 years ago

Hello,
I recommend that you handle the TreeList.ShowingEditor event and cancel the editor showing if its parent node is checked. Based on the How to add Checkedit in parent node for treelist in c# ? ticket, you are using an in-place CheckEdit to check a node. Please note that TreeList provides the built-in functionality allowing you to show check boxes within nodes. To enable it, set the TreeListOptionsView.ShowCheckBoxes property to true. I have attached samples covering both these approaches.

Please try them and let me know if you have additional questions.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.