TreeViewControl.NodeContentEditTemplateSelector Property
Gets or sets an object that chooses a template for a custom editor based on custom logic. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.1.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
DataTemplateSelector | A DataTemplateSelector descendant that chooses a template based on custom logic. |
Remarks
The NodeContentEditTemplate property specifies a template that displays a custom editor. If you have more than one editor template, you can implement custom logic to choose the required template:
- Create a template selector - a class that chooses a template based on a condition. This class should derive from the DataTemplateSelector class.
- Override the SelectTemplate method to return a template that meets the required condition.
- Assign the template selector class instance to the NodeContentEditTemplateSelector property.
If you specify both the NodeContentEditTemplate and NodeContentEditTemplateSelector, the TreeViewControl uses the template returned by the template selector.
If the template selector returns null, the TreeViewControl uses the template specified by the NodeContentEditTemplate property.