Class DataGridCheckBoxSelectorCellRenderer
A cell renderer that displays checkboxes for row selection in a DataGridCheckBoxSelectorColumn. Implements bidirectional synchronization with the DataGrid's selection controller.
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridCheckBoxSelectorCellRenderer : DataGridCellRenderer<StackLayout, View>, IDataGridCellRenderer, IDisposable
Constructors
DataGridCheckBoxSelectorCellRenderer()
Initializes a new instance of the DataGridCheckBoxSelectorCellRenderer class.
Declaration
public DataGridCheckBoxSelectorCellRenderer()
Methods
OnCreateDisplayUIView()
Creates the display view (checkbox) for a data row or header.
Declaration
protected override StackLayout OnCreateDisplayUIView()
Returns
| Type |
|---|
| StackLayout |
Overrides
OnCreateEditUIView()
Creates the edit view (same as display view since checkbox is not editable).
Declaration
protected override View OnCreateEditUIView()
Returns
| Type |
|---|
| View |
Overrides
OnInitializeDisplayView(DataColumnBase, StackLayout?)
Initializes the display view (called when rendering a data row cell). This renderer only handles data rows. Headers are handled by DataGridCheckBoxSelectorHeaderCellRenderer. Selection synchronization is now handled via RaiseSelectionChangedEvent interception in the DataGrid class.
Declaration
[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "The OnInitializeDisplayView method is not trim compatible")]
protected override void OnInitializeDisplayView(DataColumnBase dataColumn, StackLayout? view)
Parameters
| Type | Name | Description |
|---|---|---|
| DataColumnBase | dataColumn | |
| StackLayout | view |
Overrides
OnUnloadViews(DataColumnBase)
Unloads the views and unsubscribes from events to prevent memory leaks and stale event handlers.
Declaration
protected override void OnUnloadViews(DataColumnBase dataColumn)
Parameters
| Type | Name | Description |
|---|---|---|
| DataColumnBase | dataColumn |
Overrides
OnUpdateCellValue(DataColumnBase)
Updates the cell value when the underlying data changes. This is called by the DataGrid when refreshing cells.
Declaration
protected override void OnUpdateCellValue(DataColumnBase dataColumn)
Parameters
| Type | Name | Description |
|---|---|---|
| DataColumnBase | dataColumn |