Class GridPropertyGridCellRenderer
Defines the renderer part of a dropdown with an embedded System.Windows.Forms.PropertyGrid that lets users modify the properties of a complex cell value with nested properties.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridPropertyGridCellRenderer : GridDropDownCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
A renderer is created for each GridCellModelBase and GridControlBase. There can be several renderers associated with one GridPropertyGridCellModel if several views display the same GridModel.
Constructors
GridPropertyGridCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new GridPropertyGridCellRenderer object for the given GridControlBase and GridCellModelBase.
Declaration
public GridPropertyGridCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase that displays this cell renderer. |
GridCellModelBase | cellModel | The GridCellModelBase that holds data for this cell renderer that should be shared among views. |
Remarks
References to GridControlBase, and GridCellModelBase will be saved.
Methods
Dispose(Boolean)
Unwires any events subscribed from GridPropertyGridCell.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
Remarks
See the documentation for the System.ComponentModel.Component class and its Dispose member.
DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
Called to indicate that the popup child was closed.
Declaration
public override void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Source of the event. |
PopupClosedEventArgs | e | The PopupClosedEventArgsthat contains event data. |
Overrides
DropDownContainerShowedDropDown(Object, EventArgs)
Occurs after the popup child was dropped down and made visible.
Declaration
public override void DropDownContainerShowedDropDown(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Event source. |
System.EventArgs | e | The System.EventArgsthat contains event data. |
Overrides
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Occurs when the drop down is about to be shown.
Declaration
public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Event source. |
System.ComponentModel.CancelEventArgs | e | The System.ComponentModel.CancelEventArgsthat contains event data. |
Overrides
IsRelatedControl(Control, Boolean)
Indicates whether a specified control is part of the popup hierarchy.
Declaration
public override bool IsRelatedControl(Control control, bool askPopupParent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | A control instance. |
System.Boolean | askPopupParent | True if the query should be passed to the popup parent; False if you should not query the popup parent. |
Returns
Type | Description |
---|---|
System.Boolean | returns True. |
Overrides
OnDeactivating()
Called from GridCurrentCell.Deactivate after GridCurrentCell.Deactivating event and before the current cell is deactivated.
Declaration
protected override bool OnDeactivating()
Returns
Type | Description |
---|---|
System.Boolean | True if renderer can be deactivated; False if deactivation should be aborted. |
Overrides
OnDeactived(Int32, Int32)
Called from GridCurrentCell.Deactivated after the current cell is deactivated and before the GridCurrentCell.Deactivated event.
Declaration
protected override void OnDeactived(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Specifies the row id. |
System.Int32 | colIndex | Specifies the column id. |
Overrides
OnEditingComplete()
Occurs when the grid completes editing mode for the active current cell.
Declaration
protected override void OnEditingComplete()
Overrides
Remarks
The grid raises this event when the CurrentCell objects EndEdit() or CancelEdit() method is called. The event occurs after CurrentCellRejectedChanges or CurrentCellAcceptedChanges is raised.
You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.
You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.
See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.
OnEndEdit()
Called from GridCurrentCell.EndEdit. If render had focus, HasFocusControl is called which triggers OnHasFocusControlChanged() and initiates repainting the cell. In your overridden OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo) method, you should then check ShouldDrawFocused(Int32, Int32) which will return False.
Declaration
protected override void OnEndEdit()
Overrides
OnInitialize(Int32, Int32)
Called from Initialize after currentRowIndex, inInitialize are set and PerformLayout finished.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Specifies the row id. |
System.Int32 | colIndex | Specifies the column id. |
Overrides
OnMouseDown(Int32, Int32, MouseEventArgs)
This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user has pressed a mouse button.
Declaration
protected override void OnMouseDown(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 | The System.Windows.Forms.MouseEventArgsthat contains 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. |
Overrides
OnStartEditing()
Occurs before the current cell switches into editing mode.
Declaration
protected override bool OnStartEditing()
Returns
Type | Description |
---|---|
System.Boolean | True if editing the cell is allowed; false otherwise. |
Overrides
OnValidate()
This method is called from GridCurrentCell.Validate after GridCurrentCell.Validating event has been fired. The default version checks if the active text fits any criteria as specified in the style object: It can be parsed into a cell value and meets GridCellValidateValueInfo criteria.
Declaration
protected override bool OnValidate()
Returns
Type | Description |
---|---|
System.Boolean | True if the modified text is valid; |
Overrides
ValidateString(String)
Checks if the given text is valid.
Declaration
public override bool ValidateString(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Input text. |
Returns
Type | Description |
---|---|
System.Boolean | returns True. |