Back to Devexpress

SpreadsheetControl.CellTemplateSelector Property

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-519030d4.md

latest2.4 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public DataTemplateSelector CellTemplateSelector { get; set; }
vb
Public Property CellTemplateSelector As DataTemplateSelector

Property Value

TypeDescription
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

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace