Class DataGridPercentCellRenderer
A cell renderer that displays percentage values in DataGridCell. Supports dual display modes: PercentMode (multiply by 100) and DoubleMode (display as-is).
Inheritance
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridPercentCellRenderer : DataGridCellRenderer<SfDataGridLabel, SfNumericEntry>, IDataGridCellRenderer, IDisposable
Constructors
DataGridPercentCellRenderer()
Initializes a new instance of the DataGridPercentCellRenderer class.
Declaration
public DataGridPercentCellRenderer()
Methods
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 (numeric, not formatted). |
Overrides
OnCreateDisplayUIView()
Creates the view for the display UI.
Declaration
protected override SfDataGridLabel OnCreateDisplayUIView()
Returns
| Type |
|---|
| SfDataGridLabel |
Overrides
OnCreateEditUIView()
Creates a new view for the edit mode of cell.
Declaration
protected override SfNumericEntry OnCreateEditUIView()
Returns
| Type |
|---|
| SfNumericEntry |
Overrides
OnInitializeEditView(DataColumnBase, SfNumericEntry)
Initializes the edit column element with the current percentage value formatted according to PercentEditMode.
Declaration
public override void OnInitializeEditView(DataColumnBase dataColumn, SfNumericEntry view)
Parameters
| Type | Name | Description |
|---|---|---|
| Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
| SfNumericEntry | view |
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
ResumeBinding(DataColumnBase, SfDataGridLabel)
Resume the binding of a SfLabel view for display.
Declaration
protected override void ResumeBinding(DataColumnBase dataColumn, SfDataGridLabel view)
Parameters
| Type | Name | Description |
|---|---|---|
| Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
| SfDataGridLabel | view |
Overrides
SetControlValue(Object)
Set the current cell value, only if the renderer's
Declaration
public override void SetControlValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The numeric value to be set to the current cell. |
Overrides
SuspendBinding(DataColumnBase, SfDataGridLabel)
Suspend the binding of a SfLabel view for display.
Declaration
protected override void SuspendBinding(DataColumnBase dataColumn, SfDataGridLabel view)
Parameters
| Type | Name | Description |
|---|---|---|
| Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
| SfDataGridLabel | view |
Overrides
UnwireEditUIElement(SfNumericEntry)
Unwires the edit element to the view.
Declaration
protected override void UnwireEditUIElement(SfNumericEntry editElement)
Parameters
| Type | Name | Description |
|---|---|---|
| SfNumericEntry | editElement |
Overrides
UpdateEditViewCellStyle(DataColumnBase, SfNumericEntry)
Updates the cell style of the edit element in a grid cell.
Declaration
protected override void UpdateEditViewCellStyle(DataColumnBase dataColumn, SfNumericEntry editView)
Parameters
| Type | Name | Description |
|---|---|---|
| Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
| SfNumericEntry | editView |