Class GridCellSwitchRenderer
GridCellSwitchRenderer is a class for cell renderer that displays UIKit.UISwitch 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
Assembly: Syncfusion.SfDataGrid.iOS.dll
Syntax
public class GridCellSwitchRenderer : GridVirtualizingCellRendererBase<UISwitch, UISwitch>, IGridCellRenderer, IDisposable
Constructors
GridCellSwitchRenderer()
Initializes a new instance of the GridCellSwitchRenderer class.
Declaration
public GridCellSwitchRenderer()
Methods
CreateOrRecycleDisplayUIView()
Creates a new view or reuses the existing view if reusing can be applied here
Declaration
protected override UISwitch CreateOrRecycleDisplayUIView()
Returns
Type | Description |
---|---|
UIKit.UISwitch | Returns a created new view or reuses the existing view if reusing can be applied here |
Overrides
OnCreateDisplayUIView()
Creates a new UIKit.UISwitch view.
Declaration
protected override UISwitch OnCreateDisplayUIView()
Returns
Type | Description |
---|---|
UIKit.UISwitch | A new UIKit.UISwitch view. |
Overrides
OnInitializeDisplayView(DataColumnBase, UISwitch)
Initializes the column element of a Syncfusion.SfDataGrid.DataColumn object with the given UIKit.UISwitch and required values.
Declaration
public override void OnInitializeDisplayView(DataColumnBase dataColumn, UISwitch view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
UIKit.UISwitch | view | A UIKit.UISwitch view to be hosted inside the column element. |
Overrides
OnUnloadViews(DataColumnBase)
Called from UnloadViews(DataColumnBase) after a cell is scrolled out of view. GridVirtualizingCellRendererBase<T1, T2> overrides this method and either removes the cell renderer visuals from the parent canvas or hide them and reuse it later in same canvas depending on whether AllowRecycle was set.
Declaration
protected override void OnUnloadViews(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
Overrides
OnUpdateCellValue(DataColumnBase)
Updates the toggle value of the UIKit.UISwitch.
Declaration
protected override void OnUpdateCellValue(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.DataColumnBase | dataColumn | The data column. |
Overrides
OnUpdateDisplayValue(DataColumnBase, UISwitch)
Updates the column element of a Syncfusion.SfDataGrid.DataColumn object with the given UIKit.UISwitch and required values.
Declaration
public override void OnUpdateDisplayValue(DataColumnBase dataColumn, UISwitch view)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.SfDataGrid.DataColumnBase | dataColumn | The dataColumn containing the details of the column. |
UIKit.UISwitch | view | A UIKit.UISwitch to be updated inside the column element. |