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.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.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. |
System.Windows.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
Declaration
public override void OnInitializeTemplateElement(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
System.Windows.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 |
---|
System.Windows.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 |
---|
System.Windows.FrameworkElement |
Overrides
OnRenderContent(DrawingContext, Rect, Geometry, DataColumnBase, GridCell, Object)
Declaration
protected override void OnRenderContent(DrawingContext dc, Rect cellRect, Geometry clipGeometry, DataColumnBase dataColumnBase, GridCell gridCell, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | |
System.Windows.Rect | cellRect | |
System.Windows.Media.Geometry | clipGeometry | |
DataColumnBase | dataColumnBase | |
GridCell | gridCell | |
System.Object | dataContext |
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
Declaration
public override void OnUpdateTemplateBinding(DataColumnBase dataColumn, ContentControl uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | Specifies the corresponding DataColumnBase. |
System.Windows.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 System.Windows.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 |