Gets or sets the maximum number of visible rows in the combobox.
[Visual Basic]
Public Property MaxComboItems As Integer
[C#]
public int MaxComboItems {get;set;}
[Delphi]
public property MaxComboItems: Int32 read get_MaxComboItems write set_MaxComboItems;
Remarks
When the Presentation property of a column's ValueItems object is set to either of the combo box options (sorted or unsorted), the MaxComboItems property determines the combo box height in terms of the number of value items displayed.
If the total number of value items is less than or equal to MaxComboItems, then all value items will be shown. If the total number of value items exceeds MaxComboItems, only MaxComboItems will be shown, but a scroll bar will appear at the right edge of the drop-down combo to allow users to bring the other value items into view.
Example
The following code displays only one allowable value in the combo box at a time:
Me.C1TrueDBGrid1.Columns("Country").ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.ComboBox
Me.C1TrueDBGrid1.Columns("Country").ValueItems.MaxComboItems = 1
· C#
this.c1TrueDBGrid1.Columns["Country"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.ComboBox;
this.c1TrueDBGrid1.Columns["Country"].ValueItems.MaxComboItems = 1;
· Delphi
Self.C1TrueDBGrid1.Columns['Country'].ValueItems.Presentation := C1.Win.C1TrueDBGrid.PresentationEnum.ComboBox;
Self.C1TrueDBGrid1.Columns['Country'].ValueItems.MaxComboItems := 1;
See Also
ValueItems Class | ValueItems Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |