Class GridVirtualizingCellRenderer<D, E>
GridVirtualizingCellRenderer is an abstract base class for cell renderers
that need live UIElement visuals displayed in a cell. You can derive from
this class and provide the type of the UIElement you want to show inside cells
as type parameter. The class provides strong typed virtual methods for
initializing content of the cell and arranging the cell visuals. See
The idea behind this class is to provide a place where we can add general code that should be shared for all cell renderers in the tree derived from GridVirtualizingCellRendererBase. While this class does at the moment not add meaningful functionality to GridVirtualizingCellRendererBase we created this extra layer of inheritance to make it easy to share code for the GridVirtualizingCellRendererBase base class between grid and common assemblies and keep grid control specific code out of the base class. It is currently not possible with C# to the base class as template type parameter.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public abstract class GridVirtualizingCellRenderer<D, E> : GridVirtualizingCellRendererBase<D, E>, IGridCellRenderer, IDisposable where D : FrameworkElement, new()
where E : FrameworkElement, new()
Type Parameters
Name | Description |
---|---|
D | |
E |
Constructors
GridVirtualizingCellRenderer()
Declaration
protected GridVirtualizingCellRenderer()
Properties
EditorType
Declaration
public Type EditorType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
CurrentRendererValueChanged()
Declaration
protected virtual void CurrentRendererValueChanged()
OnInitializeDisplayElement(DataColumnBase, D, Object)
Initialize the binding for display element of corresponding column.
Declaration
public override void OnInitializeDisplayElement(DataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
D | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnInitializeEditElement(DataColumnBase, E, Object)
Initialize the binding for editor control of corresponding column.
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, E uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
E | uiElement | Specifies the data context of the particular row |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
Initialize the binding for GridCell by Columns's CellTemplate and CellTemplateSelector.
Declaration
public override void OnInitializeTemplateElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
System.Windows.Controls.ContentControl | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateDisplayBinding(DataColumnBase, D, Object)
Updates the binding for display element of corresponding column.
Declaration
public override void OnUpdateDisplayBinding(DataColumnBase dataColumn, D uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
D | uiElement | Specifies the data context of the particular row |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateEditBinding(DataColumnBase, E, Object)
Updates the binding for editor control of corresponding column.
Declaration
public override void OnUpdateEditBinding(DataColumnBase dataColumn, E element, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
E | element | Specifies the data context of the particular row |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
Updates the binding for the GridCell by Column's CellTemplate and CellTemplateSelector.
Declaration
public override void OnUpdateTemplateBinding(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the dataColumn which contain GridColumn, RowColumnIndex |
System.Windows.Controls.ContentControl | uiElement | Specifies the display control to initialize binding |
System.Object | dataContext | Specifies the data context of the particular row |
Overrides
ShouldGridTryToHandleKeyDown(KeyEventArgs)
Handles the key interaction with editor of corresponding column.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e |
Returns
Type | Description |
---|---|
System.Boolean | Returns true handled by SfDataGrid. Returns false handled by editor of column. |
Overrides
TextAlignmentToHorizontalAlignment(TextAlignment)
Texts the alignment to horizontal alignment.
Declaration
protected HorizontalAlignment TextAlignmentToHorizontalAlignment(TextAlignment textAlignment)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.TextAlignment | textAlignment | The text alignment. |
Returns
Type | Description |
---|---|
System.Windows.HorizontalAlignment |
UpdateToolTip(DataColumnBase)
Updates the tool tip for GridCell.
Declaration
public override void UpdateToolTip(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Which holds GridColumn, Row Column Index and GridCell |