Class GridCellTemplateRenderer
GridCellTemplateRenderer is a class for cell renderer that displays customized view in a GridCell. The class provides strong typed override methods for initializing Content of the cell and arranging the cell visuals.
Updates to appearance and Content of child elements, creation and unloading of views will not trigger layout or render calls in parent canvas.
Inheritance
Inherited Members
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridCellTemplateRenderer : GridVirtualizingCellRendererBase<View, View>, IGridCellRenderer, IDisposable
Remarks
GridCellTemplateRenderer loads a view inside the grid cell. using the CellTemplate or CellTemplateSelector property of the GridTemplateColumn.
Constructors
GridCellTemplateRenderer()
Initializes a new instance of the GridCellTemplateRenderer class.
Declaration
public GridCellTemplateRenderer()
Methods
CanUpdateBinding(DataColumnBase)
Determines whether the binding for the column can be updated. Implement this method to update binding on particular renderer when the data context is set.
Declaration
public override bool CanUpdateBinding(DataColumnBase dataColumnBase)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.XForms.DataColumnBase | dataColumnBase | The corresponding column for which the binding update should be determined. |
Returns
Type | Description |
---|---|
System.Boolean | True if the binding is updated for the column, otherwise false. |
Overrides
GetControlValue()
Returns the current cell value, only if the renderer's HasCurrentCellState is true.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | The current cell value. |
Overrides
OnCreateDisplayUIView()
Creates a new Xamarin.Forms.View.
Declaration
protected override View OnCreateDisplayUIView()
Returns
Type | Description |
---|---|
Xamarin.Forms.View | A new Xamarin.Forms.View. |
Overrides
OnInitializeDisplayView(DataColumnBase, View)
Initializes the column element of a Syncfusion.SfDataGrid.XForms.DataColumn object with the given Xamarin.Forms.ContentView.
Declaration
public override void OnInitializeDisplayView(DataColumnBase dataColumn, View view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.XForms.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
Xamarin.Forms.View | view | A Xamarin.Forms.View to be hosted inside the column element. |
Overrides
OnInitializeEditView(DataColumnBase, View)
Initializes the column element of a Syncfusion.SfDataGrid.XForms.DataColumn object with the given Xamarin.Forms.ContentView in edit data template.
Declaration
public override void OnInitializeEditView(DataColumnBase dataColumn, View view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.XForms.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
Xamarin.Forms.View | view | A Xamarin.Forms.View to be hosted inside the column element. |
Overrides
OnUpdateCellValue(DataColumnBase)
Updates the cell value of the column.
Declaration
protected override void OnUpdateCellValue(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.XForms.DataColumnBase | dataColumn | The data column. |
Overrides
OnUpdateDisplayValue(DataColumnBase, View)
Updates the column element of a Syncfusion.SfDataGrid.XForms.DataColumn object with the given Xamarin.Forms.ContentView.
Declaration
public override void OnUpdateDisplayValue(DataColumnBase dataColumn, View view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.XForms.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
Xamarin.Forms.View | view | A Xamarin.Forms.View to be updated inside the column element. |
Overrides
SetFocus(View, Boolean)
Sets the focus for the editing view.
Declaration
protected override void SetFocus(View view, bool needToFocus)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.View | view | The current cell renderer element. |
System.Boolean | needToFocus | Returns whether focus has to be set or not. |