Class DataGridCellTemplateRenderer
A a class for cell renderer that displays customized view in a DataGridCell. 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.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridCellTemplateRenderer : DataGridCellRenderer<View, View>, IDataGridCellRenderer, IDisposable
Remarks
DataGridCellTemplateRenderer loads a view inside the grid cell.
using the CellTemplate or
Constructors
DataGridCellTemplateRenderer()
Initializes a new instance of the DataGridCellTemplateRenderer class.
Declaration
public DataGridCellTemplateRenderer()
Methods
CanUpdateBinding(DataColumnBase)
ToDo
Declaration
public override bool CanUpdateBinding(DataColumnBase dataColumnBase)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumnBase | The corresponding column for which the binding update should be determined. |
Returns
Type |
---|
System.Boolean |
Overrides
GetControlValue()
Returns the current cell value, only if the renderer's
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | The current cell value. |
Overrides
OnCreateDisplayUIView()
Creates a new Microsoft.Maui.Controls.View.
Declaration
protected override View OnCreateDisplayUIView()
Returns
Type |
---|
Microsoft.Maui.Controls.View |
Overrides
OnInitializeDisplayView(DataColumnBase, View)
Initializes settings of the display view.
Declaration
protected override void OnInitializeDisplayView(DataColumnBase dataColumn, View view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
Microsoft.Maui.Controls.View | view |
Overrides
OnInitializeEditView(DataColumnBase, View)
Initializes the column element of a Syncfusion.Maui.DataGrid.DataColumn object with the given Microsoft.Maui.Controls.ContentView in edit data template.
Declaration
public override void OnInitializeEditView(DataColumnBase dataColumn, View view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
Microsoft.Maui.Controls.View | view | A Microsoft.Maui.Controls.View to be hosted inside the column element. |
Overrides
OnSetCellStyle(DataColumnBase)
Sets the style to the element of DataGridCellTemplateRenderer.
Declaration
protected override void OnSetCellStyle(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn |
Overrides
OnUpdateCellValue(DataColumnBase)
Called when the cell value is updated.
Declaration
protected override void OnUpdateCellValue(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn |
Overrides
SetFocus(View, Boolean)
Sets the focus for the editing view.
Declaration
protected override void SetFocus(View view, bool needToFocus)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Controls.View | view | The current cell renderer element. |
System.Boolean | needToFocus | Returns whether focus has to be set or not. |