Class GridDropDownStandardValuesCellRenderer
Defines the renderer part of a drop-down ListControl-like grid that lets users drop-down a grid that display choices for a cell determined through the System.ComponentModel.TypeConverter.GetStandardValues method of a System.ComponentModel.TypeConverter.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridDropDownStandardValuesCellRenderer : GridDropDownGridListControlCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
The GridDropDownStandardValuesCellRenderer supports an autocomplete feature that will fill the text with possible matches from the drop-down list while the user is entering text.
A renderer is created for each GridCellModelBase and GridControlBase. There can be several renderers associated with one GridDropDownStandardValuesCellModel if several views display the same GridModel.
Constructors
GridDropDownStandardValuesCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new GridDropDownStandardValuesCellRenderer object for the given GridControlBase and GridCellModelBase.
Declaration
public GridDropDownStandardValuesCellRenderer(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
CreateListControlPart()
Creates the grid that is 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)
Unwires any events subscribed from GridDropDownStandardValuesCell.
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.
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Occurs when the drop down container 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
GetDefaultMaxSize()
Returns the maximum size in pixels for the dropdown grid. If more items need to be displayed that fit into that screen area, scrollbars will be shown.
Declaration
protected virtual Size GetDefaultMaxSize()
Returns
Type | Description |
---|---|
System.Drawing.Size | The maximum size in pixels for the dropdown grid |
GetDropDownPaintValueWidth()
Returns the width of a possible "Glyph" to be drawn before the cell value. This method is overridden by the UITypeEditorCellRenderer
Declaration
protected virtual int GetDropDownPaintValueWidth()
Returns
Type | Description |
---|---|
System.Int32 | The width in pixel for the glyph. |
OnEnsureListControlPart()
Declaration
protected override void OnEnsureListControlPart()
Overrides
OnInitialize(Int32, Int32)
This method gets called from the cell renderer's initialize method. Override this method if you need to any initialization for the current cell.
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 |
Overrides
ValidateString(String)
Checks if the specified text is valid.
Declaration
public override bool ValidateString(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Input text. |
Returns
Type | Description |
---|---|
System.Boolean | True if the text is valid; False otherwise. |