Class GridCellCheckBoxRenderer
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
[ClassReference(IsReviewed = false)]
public class GridCellCheckBoxRenderer : GridVirtualizingCellRenderer<CheckBox, CheckBox>, IGridCellRenderer, IDisposable
Constructors
GridCellCheckBoxRenderer()
Initializes a new instance of the GridCellCheckBoxRenderer class.
Declaration
public GridCellCheckBoxRenderer()
Fields
IsCheckedProperty
Declaration
public static readonly DependencyProperty IsCheckedProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
Methods
CanCheckAddNewRowAtFirstClick()
Method that used to decide whether AddNewRow check box column can get check at first click or not.
Declaration
protected virtual bool CanCheckAddNewRowAtFirstClick()
Returns
Type | Description |
---|---|
System.Boolean |
CanUpdateBinding(GridColumn)
Declaration
public override bool CanUpdateBinding(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
EndEdit(DataColumnBase, Object, Boolean)
Declaration
public override bool EndEdit(DataColumnBase dc, object record, bool canResetBinding = false)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dc | |
System.Object | record | |
System.Boolean | canResetBinding |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetControlValue()
Gets the control value.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object |
Overrides
GetIsChecked(DependencyObject)
Gets the IsChecked attached property value of CheckBox which is bound with underlying data object.
Declaration
public static object GetIsChecked(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj |
Returns
Type | Description |
---|---|
System.Object |
Remarks
IsChecked attached property used only when GridCheckBoxColumn.IsThreeState is true.
OnEditElementLoaded(Object, RoutedEventArgs)
Invoked when the edit element(CheckBox) is loaded on the cell in column
Declaration
protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
Overrides
OnEditElementUnloaded(Object, RoutedEventArgs)
Invoked when the edit element(CheckBox) is unloaded on the cell in column.
Declaration
protected override void OnEditElementUnloaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
Overrides
OnInitializeEditElement(DataColumnBase, CheckBox, Object)
Method which is initialize the Renderer element Bindings with corresponding column values.
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, CheckBox uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn Which holds GridColumn, RowColumnIndex and GridCell |
System.Windows.Controls.CheckBox | uiElement | Corresponding Renderer Element |
System.Object | dataContext |
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
OnUnwireEditUIElement(CheckBox)
Declaration
protected override void OnUnwireEditUIElement(CheckBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.CheckBox | uiElement |
Overrides
OnUpdateEditBinding(DataColumnBase, CheckBox, Object)
Method which is used to update the Renderer element Bindings with corresponding column values.
Declaration
public override void OnUpdateEditBinding(DataColumnBase dataColumn, CheckBox element, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn Which holds GridColumn, RowColumnIndex and GridCell |
System.Windows.Controls.CheckBox | element | Corresponding Renderer Element |
System.Object | dataContext | dataContext of the row |
Overrides
SetControlValue(Object)
Sets the control value.
Declaration
public override void SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value. |
Overrides
SetCurrentCellState(RowColumnIndex, FrameworkElement, Boolean, Boolean, GridColumn, DataColumnBase)
Sets the current cell state when the cell is activated.
Declaration
public override void SetCurrentCellState(RowColumnIndex currentCellIndex, FrameworkElement currentCellElement, bool isInEditing, bool isFocused, GridColumn column, DataColumnBase dc)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | currentCellIndex | Specifies the index of cell. |
System.Windows.FrameworkElement | currentCellElement | The corresponding current cell uielement. |
System.Boolean | isInEditing | Specifies whether the current cell is editable or not. |
System.Boolean | isFocused | Specifies whether the current cell is focused or not. |
GridColumn | column | The corresponding column to set the current cell state. |
DataColumnBase | dc | The corresponding data column to set the current cell state. |
Overrides
SetIsChecked(DependencyObject, Object)
Sets the IsChecked attached property value of CheckBoox which is bound with underlying data object.
Declaration
public static void SetIsChecked(DependencyObject obj, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | |
System.Object | value |
Remarks
IsChecked attached property used only when GridCheckBoxColumn.IsThreeState is true.
ShouldGridTryToHandleKeyDown(KeyEventArgs)
Shoulds the grid try automatic handle key down.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The |
Returns
Type | Description |
---|---|
System.Boolean |