Class GridNumericCellRenderer
Represents the class that used for drawing the numeric text box cell.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Renderers
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public class GridNumericCellRenderer : GridVirtualizingCellRendererBase<SfNumericTextBox>, IGridCellRenderer<TableControl>, IDisposable
Constructors
GridNumericCellRenderer()
Initializes a new instance of the GridNumericCellRenderer class.
Declaration
public GridNumericCellRenderer()
Methods
GetControlValue()
Overridden to get the control value.
Declaration
public override object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Returns the control value. |
Overrides
GetEditorUIElementBounds()
Overridden to get the proper editor element bounds.
Declaration
protected override Rectangle GetEditorUIElementBounds()
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | Returns the editor element bounds. |
Overrides
OnEditingComplete(DataColumnBase, SfNumericTextBox)
Overridden to raise the QueryUnboundValue event.
Declaration
protected override void OnEditingComplete(DataColumnBase column, SfNumericTextBox currentRendererElement)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | column | The DataColumnBase of the cell. |
SfNumericTextBox | currentRendererElement | The UI element of the cell. |
Overrides
OnInitializeEditElement(DataColumnBase, RowColumnIndex, SfNumericTextBox)
Overridden to initialize the numeric text box as editor control of the cell.
Declaration
protected override void OnInitializeEditElement(DataColumnBase column, RowColumnIndex rowColumnIndex, SfNumericTextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | column | The DataColumnBase of the current cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the current cell. |
SfNumericTextBox | uiElement | The text box of the current cell. |
Overrides
OnKeyDown(DataColumnBase, RowColumnIndex, KeyEventArgs)
Occurs when the key is pressed while the cell has focus.
Declaration
protected override void OnKeyDown(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the cell. |
System.Windows.Forms.KeyEventArgs | e | The System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnKeyPress(DataColumnBase, RowColumnIndex, KeyPressEventArgs)
Occurs when the key is pressed while the cell has focus.
Declaration
protected override void OnKeyPress(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, KeyPressEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the cell. |
System.Windows.Forms.KeyPressEventArgs | e | The System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnKeyUp(DataColumnBase, RowColumnIndex, KeyEventArgs)
Occurs when the key is released while the cell has focus.
Declaration
protected override void OnKeyUp(DataColumnBase dataColumn, RowColumnIndex rowColumnIndex, KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the cell. |
System.Windows.Forms.KeyEventArgs | e | The System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnRender(Graphics, Rectangle, String, CellStyleInfo, DataColumnBase, RowColumnIndex)
Overridden to draw the numeric text box cell.
Declaration
protected override void OnRender(Graphics paint, Rectangle cellRect, string cellValue, CellStyleInfo style, DataColumnBase column, RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | paint | The System.Drawing.Graphics that used to draw the cell. |
System.Drawing.Rectangle | cellRect | The bounds of the cell. |
System.String | cellValue | The value of the cell. |
CellStyleInfo | style | The CellStyleInfo of the cell. |
DataColumnBase | column | The DataColumnBase of the cell. |
RowColumnIndex | rowColumnIndex | The row and column index of the cell. |
Overrides
OnWireEditUIElement(SfNumericTextBox)
Overridden to wire the events of the SfNumericTextBox.
Declaration
protected override void OnWireEditUIElement(SfNumericTextBox uiElement)
Parameters
Type | Name | Description |
---|---|---|
SfNumericTextBox | uiElement | The SfNumericTextBox control. |
Overrides
SetControlValue(Object)
Overridden to set the control value.
Declaration
public override void SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The control value. |