ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DataColumn.DropDown Property

Gets or sets the C1TrueDBDropdown control associated with this column.

[Visual Basic]

Public Property DropDown As C1TrueDBDropdown

[C#]

public C1TrueDBDropdown DropDown {get;set;}

[Delphi]

public property DropDown: C1TrueDBDropdown read get_DropDown write set_DropDown;

Remarks

This property associates a C1TrueDBDropdown control with a column in a C1TrueDBGrid control. When the user clicks the column's in-cell button, the associated C1TrueDBDropdown control is displayed below the current cell.

Use the DropDown property and a C1TrueDBDropdown control to implement a multicolumn drop-down list box that works seamlessly with a C1TrueDBGrid control. The C1TrueDBDropdown.DisplayMember property of the drop-down control determines which column is used for incremental search. The C1TrueDBDropdown.ValueMember property of the drop-down control determines which grid column is updated when the user selects an item.

Note: When the DropDown property of a column is set to a C1TrueDBDropdown control, then the C1DisplayColumn.Button property for that column will be set to True. Similarly, if the DropDown property of a column is set to null, then the C1DisplayColumn.Button property for that column will be set to False.

Example

The following code uses the DropDown property to set the C1TrueDBDropdowns back color to AliceBlue:

·      Visual Basic

       Me.C1TrueDBGrid1.Columns(0).DropDown.BackColor = Color.AliceBlue

·      C#

       this.c1TrueDBGrid1.Columns[0].DropDown.BackColor = Color.AliceBlue;

·      Delphi

       Self.C1TrueDBGrid1.Columns[0].DropDown.BackColor := Color.AliceBlue;

See Also

C1DataColumn Class | C1DataColumn Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.