Class PercentTextBoxCellRenderer
Implements a cell renderer for the PercentTextBoxCell.
Inheritance
Inherited Members
Namespace: Syncfusion.GridHelperClasses
Assembly: Syncfusion.GridHelperClasses.Windows.dll
Syntax
public class PercentTextBoxCellRenderer : GridTextBoxCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Constructors
PercentTextBoxCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the PercentTextBoxCellRenderer class.
Declaration
public PercentTextBoxCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
| Type | Name | Description |
|---|---|---|
| GridControlBase | grid | The GridControlBaseto to add cell renderer. |
| GridCellModelBase | cellModel | The GridCellModelBase. |
Methods
CanPaste()
Determines whether current cell can be pasted from clipboard.
Declaration
public override bool CanPaste()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if paste is supported; otherwise False. |
Overrides
OnCellLayoutChanged()
Used to update the cell with its visibility.
Declaration
protected override void OnCellLayoutChanged()
Overrides
OnClick(Int32, Int32, MouseEventArgs)
Action performed while click on the cell.
Declaration
protected override void OnClick(int rowIndex, int colIndex, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | rowIndex | Row Index. |
| System.Int32 | colIndex | Column Index. |
| System.Windows.Forms.MouseEventArgs | e | The System.Windows.Forms.MouseEventArgs that contains the event data. |
Overrides
OnDeactived(Int32, Int32)
Deactivate the cell.
Declaration
protected override void OnDeactived(int rowIndex, int colIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | rowIndex | RowIndex of a cell. |
| System.Int32 | colIndex | Column Index of a cell. |
Overrides
OnDoubleClick(Int32, Int32, MouseEventArgs)
Called when the user double-clicks inside a cell.
Declaration
protected override void OnDoubleClick(int rowIndex, int colIndex, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | rowIndex | The row index. |
| System.Int32 | colIndex | The column index. |
| System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs with data about the mouse event. |
Overrides
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Draws the content of the cell.
Declaration
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | Graphics context. |
| System.Drawing.Rectangle | clientRectangle | Cell rectangle. |
| System.Int32 | rowIndex | Row index. |
| System.Int32 | colIndex | Column index. |
| GridStyleInfo | style | Cell style information. |
Overrides
OnInitialize(Int32, Int32)
Immediately switch into editing mode when cell is initialized.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | rowIndex | Row Index. |
| System.Int32 | colIndex | Column Index. |
Overrides
OnKeyPress(KeyPressEventArgs)
Triggers when key is pressed.
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.KeyPressEventArgs | e | The System.Windows.Forms.KeyPressEventArgs that contains the event data. |
Overrides
OnSaveChanges()
This method is called from GridCurrentCell.ConfirmChanges when the current cell was marked as modified. Any drop-downs have been closed at this time. It saves changes for the current cell.
Declaration
protected override bool OnSaveChanges()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if changes were saved successfully; False if no changes were saved. |