Class GridUnboundRowCellRenderer<D, E>
GridVirtualizingUnBoundRowCellRenderer is an abstract base class for UnBoundRow cell renderers that need live UIElement visuals displayed in a cell. You can derive from this class and provide the type of the UIElement you want to show inside cells as type parameter. The class provides strong typed virtual methods for initializing content of the cell and arranging the cell visuals. See GridVirtualizingCellRendererBase<D, E> for more details.
The idea behind this class is to provide a place where we can add general code that should be shared for all cell renderers in the tree derived from GridVirtualizingCellRendererBase. While this class does at the moment not add meaningful functionality to GridVirtualizingCellRendererBase we created this extra layer of inheritance to make it easy to share code for the GridVirtualizingCellRendererBase base class between grid and common assemblies and keep grid control specific code out of the base class. It is currently not possible with C# to the base class as template type parameter.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.DataGrid.Renderers
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public abstract class GridUnboundRowCellRenderer<D, E> : GridVirtualizingCellRenderer<D, E>, IGridCellRenderer, IDisposable where D : FrameworkElement, new()
where E : FrameworkElement, new()
Type Parameters
Name |
---|
D |
E |
Constructors
GridUnboundRowCellRenderer()
Declaration
protected GridUnboundRowCellRenderer()
Methods
BeginEdit(RowColumnIndex, FrameworkElement, GridColumn, Object)
Starts an edit operation on a current cell.
Declaration
public override bool BeginEdit(RowColumnIndex cellRowColumnIndex, FrameworkElement cellElement, GridColumn column, object record)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | cellRowColumnIndex | Specifies the row and column index of the cell to start an edit operation. |
Microsoft.UI.Xaml.FrameworkElement | cellElement | Specifies the UIElement of the cell to start an edit operation. |
GridColumn | column | Specifies the corresponding GridColumn to edit the cell. |
System.Object | record | Specifies the corresponding record to edit the cell. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the current cell starts an editing; otherwise, false. |
Overrides
CanUpdateBinding(GridColumn)
Determines whether the binding for the column can be updated.Implement this method to update binding on particular renderer whether the data context is set.
Declaration
public override bool CanUpdateBinding(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column | Specifies the corresponding GridColumn. |
Returns
Type | Description |
---|---|
System.Boolean | True if the binding is updated for the column; otherwise false. |
Overrides
CanValidate()
Determines whether the cell validation is allowed.
Declaration
public override bool CanValidate()
Returns
Type | Description |
---|---|
System.Boolean | True if the cell validation is allowed; otherwise false. |
Overrides
EndEdit(DataColumnBase, Object, Boolean)
Ends the edit occurring on the cell.
Declaration
public override bool EndEdit(DataColumnBase dc, object record, bool canResetBinding = false)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dc | Specifies the corresponding DataColumnBase to complete the edit operation. |
System.Object | record | Specifies the corresponding record to complete the edit operation. |
System.Boolean | canResetBinding | Specifies whether the binding is reset or not. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the edit ends on the cell ; otherwise, false. |
Overrides
InitializeCellStyle(DataColumnBase, Object)
Initializes the custom style for cell when the corresponding API's and Selectors are used.
Declaration
protected override void InitializeCellStyle(DataColumnBase dataColumn, object record)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase to initialize cell style. |
System.Object | record | Specifies the corresponding record to initialize cell style. |
Overrides
OnInitializeTemplateElement(DataColumnBase, ContentControl, Object)
Initialize the binding for GridUnboundRowCell by Columns's CellTemplate and CellTemplateSelector.
Declaration
public override void OnInitializeTemplateElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
Microsoft.UI.Xaml.Controls.ContentControl | uiElement | Specifies the display control to initialize binding. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
OnPrepareUIElements()
Invoked when the cell elements are prepared for rendering in view .
Declaration
protected override FrameworkElement OnPrepareUIElements()
Returns
Type |
---|
Microsoft.UI.Xaml.FrameworkElement |
Overrides
OnPrepareUIElements(DataColumnBase, Object, Boolean)
Declaration
protected override FrameworkElement OnPrepareUIElements(DataColumnBase dataColumn, object record, bool isInEdit)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | |
System.Object | record | |
System.Boolean | isInEdit |
Returns
Type |
---|
Microsoft.UI.Xaml.FrameworkElement |
Overrides
OnUpdateBindingInfo(DataColumnBase, Object, Boolean)
Updates the binding of the Cell UIElement for the specified column. Implement this method to update binding when the cell UIElement is reused during horizontal scrolling.
Declaration
protected override void OnUpdateBindingInfo(DataColumnBase dataColumn, object record, bool isInEdit)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase to update binding. |
System.Object | record | Specifies the corresponding record to update binding. |
System.Boolean | isInEdit | Indicates the whether the cell is in editing or not. |
Overrides
OnUpdateTemplateBinding(DataColumnBase, ContentControl, Object)
Updates the content for the GridUnboundRowCell.
Declaration
public override void OnUpdateTemplateBinding(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
Microsoft.UI.Xaml.Controls.ContentControl | uiElement | Specifies the display control to initialize binding. |
System.Object | dataContext | Specifies the data context of the particular row. |
Overrides
UpdateToolTip(DataColumnBase)
Updates the Microsoft.UI.Xaml.Controls.ToolTip on GridUnboundRowCell.
Declaration
public override void UpdateToolTip(DataColumnBase dataColumn)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the column Which hold GridUnboundRowCell, GridColumn and cell's row Column index |