Class DataGridPickerCellRenderer
DataGridPickerCellRenderer is a custom cell renderer for the Maui DataGrid control. It displays an SfDataGridLabel as the display element and uses an SfPicker as the editing element within a DataGridCell. This renderer provides functionality for editing and displaying values in picker-style columns.
Inheritance
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridPickerCellRenderer : DataGridCellRenderer<SfDataGridLabel, SfPicker>, IDataGridCellRenderer, IDisposable
Constructors
DataGridPickerCellRenderer()
Initializes a new instance of the DataGridPickerCellRenderer class.
Declaration
public DataGridPickerCellRenderer()
Methods
BeginEdit(RowColumnIndex, DataGridCell, DataGridColumn, Object)
Override BeginEdit to adds a label control for displaying the selected value alongside the picker.
Declaration
public override bool BeginEdit(RowColumnIndex rowColumnIndex, DataGridCell cellElement, DataGridColumn column, object rowData)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | |
DataGridCell | cellElement | |
DataGridColumn | column | |
System.Object | rowData |
Returns
Type |
---|
System.Boolean |
Overrides
EndEdit(DataColumnBase, Object, Boolean)
Override EndEdit to properly removes the label control from the cell.
Declaration
public override bool EndEdit(DataColumnBase dataColumn, object record, bool canResetBinding = false)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
System.Object | record | |
System.Boolean | canResetBinding |
Returns
Type |
---|
System.Boolean |
Overrides
GetControlValue()
Gets the current cell value
Declaration
public override object GetControlValue()
Returns
Type |
---|
System.Object |
Overrides
OnCreateEditUIView()
Creates a new edit UI view for the data grid cell.
Declaration
protected override SfPicker OnCreateEditUIView()
Returns
Type |
---|
SfPicker |
Overrides
OnInitializeEditView(DataColumnBase, SfPicker)
Initializes the edit view and its properties.
Declaration
public override void OnInitializeEditView(DataColumnBase dataColumn, SfPicker picker)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
SfPicker | picker |
Overrides
OnUpdateCellValue(DataColumnBase)
Updates the cell value of the column.
Declaration
protected override void OnUpdateCellValue(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn |
Overrides
ResumeBinding(DataColumnBase, SfDataGridLabel)
Resume the binding of display view
Declaration
protected override void ResumeBinding(DataColumnBase dataColumn, SfDataGridLabel view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
SfDataGridLabel | view |
Overrides
SetControlValue(Object)
Sets the current cell value
Declaration
public override void SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Overrides
SuspendBinding(DataColumnBase, SfDataGridLabel)
Suspend the binding of display view
Declaration
protected override void SuspendBinding(DataColumnBase dataColumn, SfDataGridLabel view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
SfDataGridLabel | view |
Overrides
UnwireEditUIElement(SfPicker)
Unwires the edit element events
Declaration
protected override void UnwireEditUIElement(SfPicker editElement)
Parameters
Type | Name | Description |
---|---|---|
SfPicker | editElement |
Overrides
UpdateEditViewCellStyle(DataColumnBase, SfPicker)
Updates the style of the edit view
Declaration
protected override void UpdateEditViewCellStyle(DataColumnBase dataColumn, SfPicker picker)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | dataColumn | |
SfPicker | picker |