Skip to main content
A newer version of this page is available. .

SpreadsheetControl.CellTemplateSelector Property

Gets or sets an object that selects a cell template based on custom logic. This is a dependency property.

Namespace: DevExpress.Xpf.Spreadsheet

Assembly: DevExpress.Xpf.Spreadsheet.v19.1.dll

Declaration

public DataTemplateSelector CellTemplateSelector { get; set; }

Property Value

Type Description
DataTemplateSelector

A DataTemplateSelector descendant that selects a template based on custom logic.

Remarks

A template that defines the presentation of all existing worksheet cells can be specified by the SpreadsheetControl.CellTemplate property. To use more than one template to render cells, implement custom logic to select the required template. To do this, create a descendant of the DataTemplateSelector class, implement the SelectTemplate method that returns a template which meets the required condition, and use this method to set the CellTemplateSelector property.

If both the CellTemplate and CellTemplateSelector properties are specified, a cell is rendered using the template returned by the template selector. If the template selector returns null, the template specified by the CellTemplate property is used.

To learn more, see How to: Customize Cell Appearance Based on a Condition

See Also