Class GridTableDropDownListCellRenderer
Defines the renderer part of a drop-down ListControl-like grid that lets users drop-down a grid with information about a related foreign key table that was set up using a RelationKind.ForeignKeyReference, RelationKind.ListItemReference or RelationKind.ForeignKeyKeyWords relation.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridTableDropDownListCellRenderer : GridDropDownGridListControlCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Constructors
GridTableDropDownListCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the GridTableDropDownListCellRenderer class for the given GridControlBase and GridCellModelBase.
Declaration
public GridTableDropDownListCellRenderer(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.
Properties
GridTableControl
Gets the GridTableControl that this cell renderer belongs to.
Declaration
public GridTableControl GridTableControl { get; }
Property Value
Type |
---|
GridTableControl |
Model
Gets the GridNestedTableControlCellModel that this cell renderer belongs to.
Declaration
public GridTableDropDownListCellModel Model { get; }
Property Value
Type |
---|
GridTableDropDownListCellModel |
ModifyButton
Gets the reference to the modify button displayed in the top right corner of the dropdown grid when the underlying table is editable.
Declaration
public ButtonAdv ModifyButton { get; }
Property Value
Type |
---|
ButtonAdv |
Methods
CreateListControlPart()
Overrides and creates the grid that should to be displayed in the drop-down window.
Declaration
protected override GridListControl CreateListControlPart()
Returns
Type | Description |
---|---|
GridListControl | A GridListControl to be placed in the drop-down container. |
Overrides
Dispose(Boolean)
Overrides and manages the unwanted resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
Overrides and processed when the DropDown container closes the drop down list.
Declaration
public override void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
PopupClosedEventArgs | e | The PopupClosedEventArgs contains the event data. |
Overrides
DropDownContainerShowedDropDown(Object, EventArgs)
Overrides and triggered when the popup child is dropped down and made visible.
Declaration
public override void DropDownContainerShowedDropDown(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
System.EventArgs | e | The System.EventArgs contains the event data. |
Overrides
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Overrides and triggered when the drop down container gets changed.
Declaration
public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control. |
System.ComponentModel.CancelEventArgs | e | The System.ComponentModel.CancelEventArgs contains the event data. |
Overrides
InitializeDropDownContainer()
Overrides and initializes the drop down container.
Declaration
protected override void InitializeDropDownContainer()
Overrides
ListControlMouseUp(Object, MouseEventArgs)
Overrides and triggered when System.Windows.Forms.Control.MouseUp event is done in the list box and closes the drop-down.
Declaration
public override void ListControlMouseUp(object sender, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Control |
System.Windows.Forms.MouseEventArgs | e | The System.Windows.Forms.MouseEventArgs contains the event data. |
Overrides
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overrides and draws the drop down list.
Declaration
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The instance of the System.Drawing.Graphics class. |
System.Drawing.Rectangle | clientRectangle | The rectangle bounds of the drop down list. |
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
GridStyleInfo | style | An instance of the GridStyleInfo that holds the values of style properties. |
Overrides
OnEnsureListControlPart()
Overrides and ensures the list control in the drop down list.
Declaration
protected override void OnEnsureListControlPart()
Overrides
OnInitialize(Int32, Int32)
Overrides and triggered to initialize the drop down list.
Declaration
protected override void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
Overrides
OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)
Allows custom formatting of a cell by changing its style object.
Declaration
public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GridPrepareViewStyleInfoEventArgs | e | The GridPrepareViewStyleInfoEventArgs contains the event data. |
Overrides
OnSetControlText(String)
Overrides and sets the control text.
Declaration
protected override void OnSetControlText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to be specified. |
Overrides
OnValidate()
Overrides and triggered from Validate() after TableControlCurrentCellValidating 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; False otherwise. |
Overrides
ProcessMouseWheel(MouseEventArgs)
Overrides and determines whether the System.Windows.Forms.Control.MouseWheel event is processed by the cell renderer or not for scrolling the drop down list.
Declaration
public override bool ProcessMouseWheel(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs contains the event data. |
Returns
Type | Description |
---|---|
System.Boolean | True if the parent grid should not be scrolled; False otherwise. |
Overrides
SynchronizeDisplayText(Int32)
Overrides and synchronizes the display text.
Declaration
protected override void SynchronizeDisplayText(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index value of the display text. |