Class GridCellTemplateRenderer
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
[ClassReference(IsReviewed = false)]
public class GridCellTemplateRenderer : GridVirtualizingCellRenderer<ContentControl, ContentControl>, IGridCellRenderer, IDisposable
Constructors
GridCellTemplateRenderer()
Declaration
public GridCellTemplateRenderer()
Methods
CanValidate()
Declaration
public override bool CanValidate()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
InitializeCellStyle(DataColumnBase, Object)
Initializes the cell style.
Declaration
protected override void InitializeCellStyle(DataColumnBase dataColumn, object record)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn which holds GridColumn, RowColumnIndex and GridCell |
System.Object | record | The record. |
Overrides
OnArrange(RowColumnIndex, FrameworkElement, Rect)
Set focus to UIElement loaded in DataTemplate of GridCell on loading. since OnEditElementloaded will not fire for GridCell again when start editing.
Declaration
protected override void OnArrange(RowColumnIndex cellRowColumnIndex, FrameworkElement uiElement, Rect cellRect)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | |
System.Windows.FrameworkElement | uiElement | |
System.Windows.Rect | cellRect |
Overrides
OnEditingComplete(DataColumnBase, FrameworkElement)
Declaration
protected override void OnEditingComplete(DataColumnBase dataColumn, FrameworkElement currentRendererElement)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | |
System.Windows.FrameworkElement | currentRendererElement |
Overrides
OnEnteredEditMode(DataColumnBase, FrameworkElement)
Called when [entered edit mode].
Declaration
protected override void OnEnteredEditMode(DataColumnBase dataColumn, FrameworkElement currentRendererElement)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | |
System.Windows.FrameworkElement | currentRendererElement | The current renderer element. |
Overrides
OnInitializeDisplayElement(DataColumnBase, ContentControl, Object)
Method overridden to avoid binding for a content cntrol when cell template is not defined.
Declaration
public override void OnInitializeDisplayElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | |
System.Windows.Controls.ContentControl | uiElement | |
System.Object | dataContext |
Overrides
OnInitializeEditElement(DataColumnBase, ContentControl, Object)
Called when [initialize edit element].
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn which holds GridColumn, RowColumnIndex and GridCell |
System.Windows.Controls.ContentControl | uiElement | Corresponding Renderer Element |
System.Object | dataContext | The data context. |
Overrides
OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
Called when [initialize display element].
Declaration
public override void OnInitializeTemplateElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn which holds GridColumn, RowColumnIndex and GridCell |
System.Windows.Controls.ContentControl | uiElement | Corresponding Renderer Element |
System.Object | dataContext | The data context. |
Overrides
OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
Declaration
protected override void OnRenderContent(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | |
System.Windows.Rect | cellRect | |
System.Windows.Media.Geometry | clipGeometry | |
DataColumnBase | dataColumnBase | |
GridCell | gridCell | |
System.Object | dataContext |
Overrides
OnUnwireDisplayUIElement(ContentControl)
Called when [unwire display unique identifier element].
Declaration
protected override void OnUnwireDisplayUIElement(ContentControl uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ContentControl | uiElement | The unique identifier element. |
Overrides
OnUnwireEditUIElement(ContentControl)
Called when [unwire edit unique identifier element].
Declaration
protected override void OnUnwireEditUIElement(ContentControl uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ContentControl | uiElement | The unique identifier element. |
Overrides
OnUpdateEditBinding(DataColumnBase, ContentControl, Object)
Declaration
public override void OnUpdateEditBinding(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | |
System.Windows.Controls.ContentControl | uiElement | |
System.Object | dataContext |
Overrides
ShouldGridTryToHandleKeyDown(KeyEventArgs)
Let Renderer decide whether the parent grid should be allowed to handle keys and prevent the key event from being handled by the visual UIElement for this renderer. If this method returns true the parent grid will handle arrow keys and set the Handled flag in the event data. Keys that the grid does not handle will be ignored and be routed to the UIElement for this renderer.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | A System.Windows.Input.KeyEventArgs object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the parent grid should be allowed to handle keys; false otherwise. |