Class GridDropDownCellImp
Implements drop-down cell functionality.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridDropDownCellImp : IGridDropDownCellImp, IDisposable, IQueryFocusInside, IPopupParent, IPopupItem
Constructors
GridDropDownCellImp(GridCellRendererBase)
Initializes a new GridDropDownCellImp object.
Declaration
public GridDropDownCellImp(GridCellRendererBase renderer)
Parameters
Type | Name | Description |
---|---|---|
GridCellRendererBase | renderer | The cell renderer that you want to enable for drop-down functionality. |
Properties
CurrentCell
Gets a reference to GridCurrentCell implementation of the GridControlBase this cell renderer is associated with.
Declaration
public GridCurrentCell CurrentCell { get; }
Property Value
Type |
---|
GridCurrentCell |
DropDownButton
Gets or sets the drop-down button.
Declaration
public GridCellButton DropDownButton { get; set; }
Property Value
Type |
---|
GridCellButton |
DropDownContainer
Gets DropDownContainer. For convenience only. Same as PopupControlContainer.
Declaration
public IGridDropDownContainer DropDownContainer { get; }
Property Value
Type |
---|
IGridDropDownContainer |
EditPart
Gets the text box that is displayed in the user input field for a combo box.
Declaration
public Control EditPart { get; }
Property Value
Type |
---|
System.Windows.Forms.Control |
Grid
Gets a reference to the parent grid.
Declaration
public GridControlBase Grid { get; }
Property Value
Type |
---|
GridControlBase |
IgnoreDoubleClickTicks
Gets or sets the Environment.TickCount value until a second click should be considered a double click.
Declaration
public int IgnoreDoubleClickTicks { get; set; }
Property Value
Type |
---|
System.Int32 |
IgnoreFocus
Gets or sets a value indicating whether grid focus notification should be temporarily ignored.
Declaration
public bool IgnoreFocus { get; set; }
Property Value
Type |
---|
System.Boolean |
InitFocusEditPart
Gets or sets a value indicating whether the focus should remain with the grid or active text box when dropped-down. True if focus should remain with grid; False if drop-down should get focus.
Declaration
public bool InitFocusEditPart { get; set; }
Property Value
Type |
---|
System.Boolean |
IsDroppedDown
Gets a value indicating whether the drop-down is currently dropped-down and visible.
Declaration
public bool IsDroppedDown { get; }
Property Value
Type |
---|
System.Boolean |
PopupControlContainer
Gets the container where you can insert child controls to be displayed as drop-down part for your cell.
Declaration
public IGridDropDownContainer PopupControlContainer { get; }
Property Value
Type |
---|
IGridDropDownContainer |
Methods
ChildClosing(IPopupChild, PopupCloseType)
Called to indicate that the popup child was closed in the specified mode.
Declaration
public virtual void ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
Parameters
Type | Name | Description |
---|---|---|
IPopupChild | childUI | The child that was closed. |
PopupCloseType | popupCloseType | A PopupCloseType value. |
See Also
CreateDropDownContainer()
Creates a GridDropDownContainer and associates it with the cell's parent grid.
Declaration
public virtual IGridDropDownContainer CreateDropDownContainer()
Returns
Type | Description |
---|---|
IGridDropDownContainer | The container where you can insert child controls to be displayed as drop-down part for your cell. |
Dispose()
Unwires any events subscribed from GridDropDownContainer.
Declaration
public void Dispose()
DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
Called to indicate that the popup child was closed.
Declaration
public virtual void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The child that was closed. |
PopupClosedEventArgs | e | The event data with a PopupCloseType value. |
DropDownContainerShowedDropDown(Object, EventArgs)
Occurs after the popup has been dropped-down and made visible.
Declaration
public virtual void DropDownContainerShowedDropDown(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source of the event. |
System.EventArgs | e | An System.EventARgsthat contains the event data. |
DropDownContainerShowingDropDown(Object, CancelEventArgs)
Occurs when the drop-down container is about to be shown.
Declaration
public virtual void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source of the event. |
System.ComponentModel.CancelEventArgs | e | An System.EventARgsthat contains the event data. |
EnsureDropDownContainer()
Ensures the container is valid and initialized.
Declaration
public void EnsureDropDownContainer()
FixTopMostWindow()
Ensures that the drop-down part is the top-most window.
Declaration
public void FixTopMostWindow()
InitializeDropDownContainer()
Called to initialize contents of the drop-down container for the first time.
Declaration
public virtual void InitializeDropDownContainer()
IsRelatedControl(Control, Boolean)
Called to find out whether a specified control is part of the popup hierarchy.
Declaration
public virtual bool IsRelatedControl(Control control, bool askPopupParent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | A Control instance. |
System.Boolean | askPopupParent | True indicates this query should be passed to the IPopupParent, if any; False indicates you should not query the popup parent. |
Returns
Type | Description |
---|---|
System.Boolean | True if the control is part of the popup hierarchy; False if not. |
See Also
NotifyShowedDropDown()
Raises the OnCurrentCellShowedDropDown(EventArgs) for the parent grid.
Declaration
public void NotifyShowedDropDown()
NotifyShowingDropDown(ref Size)
Raises the OnCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs) for the parent grid.
Declaration
public bool NotifyShowingDropDown(ref Size size)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Size | size | The suggested size of the drop-down |
Returns
Type | Description |
---|---|
System.Boolean | True if drop-down should be shown; False if operation should be canceled. |
OnButtonClicked(Int32, Int32, Int32)
This method is called when the user clicks a cell button inside cell.
Declaration
public virtual void OnButtonClicked(int rowIndex, int colIndex, int button)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
System.Int32 | button | The button |
Remarks
In your overridden version of this method, you can activate the current cell for the given row and column index and then drop-down a list.
OnCloseDropDown(PopupCloseType)
This is called from GridCurrentCell.CloseDropDown.
Declaration
public virtual void OnCloseDropDown(PopupCloseType reason)
Parameters
Type | Name | Description |
---|---|---|
PopupCloseType | reason |
Remarks
If your renderer supports dropped-down state, the drop-down window should be closed at this time.
OnHasFocusControlChanged()
Override this method if your cell renderer supports in-place editing and you want to do any custom initialization at this point before cell gets redrawn.
Declaration
public virtual void OnHasFocusControlChanged()
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
public virtual void OnInitialize(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
OnKeyDown(KeyEventArgs)
Invoked when user pressed key down. (similar to Control.OnKeyDown)
Declaration
public virtual void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | e | An System.EventARgsthat contains the event data. |
OnShowDropDown()
This is called from GridCurrentCell.ShowDropDown after BeginEdit has been called.
Declaration
public virtual void OnShowDropDown()
Remarks
If your renderer supports dropped-down state, the drop-down window should be made visible at this time.
QueryFocusInside()
Determines if this control contains focus. Override this method if you want to show drop-down windows and indicate the control has not lost focus when the drop-down is shown.
Declaration
public bool QueryFocusInside()
Returns
Type | Description |
---|---|
System.Boolean | True if the control or any child control has focus; False otherwise. |
Explicit Interface Implementations
IPopupItem.GetPopupParentControl()
Declaration
Control IPopupItem.GetPopupParentControl()
Returns
Type |
---|
System.Windows.Forms.Control |
IPopupParent.GetBorderOverlapCue(PopupRelativeAlignment)
Declaration
Point[] IPopupParent.GetBorderOverlapCue(PopupRelativeAlignment relativeAlignment)
Parameters
Type | Name | Description |
---|---|---|
PopupRelativeAlignment | relativeAlignment |
Returns
Type |
---|
System.Drawing.Point[] |
IPopupParent.GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment)
Returns the location for popup, given the preferred relative alignments.
Declaration
Point IPopupParent.GetLocationForPopupAlignment(PopupRelativeAlignment prevAlign, out PopupRelativeAlignment newAlign)
Parameters
Type | Name | Description |
---|---|---|
PopupRelativeAlignment | prevAlign | The previous alignment. |
PopupRelativeAlignment | newAlign | The new alignment designated for the returned location. |
Returns
Type | Description |
---|---|
System.Drawing.Point | An ideal location for popup designated by one of the PopupRelativeAlignment values in newAlignment. Or returns a Point.Empty and set newAlignment to Syncfusion.Windows.Forms.PopupRelativeAlignment.Default if you do not intend to provide multiple preferred locations. |
IPopupParent.IsRightToLeft
Declaration
bool IPopupParent.IsRightToLeft { get; }
Returns
Type |
---|
System.Boolean |