GrapeCity MultiRow Windows Forms Documentation
AutoCompleteCustomSource Property
Example 


Gets or sets a custom System.Collections.Specialized.StringCollection to use when the AutoCompleteSource property is set to CustomSource (refer to System.Windows.Forms.ComboBox.AutoCompleteCustomSource).
Syntax
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.ListCellStringCollectionEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")>
<SRDescriptionAttribute("Indicates the auto complete custom source, which is a custom StringCollection used when the AutoCompleteSource is CustomSource.")>
<MergablePropertyAttribute(False)>
<SRCategoryAttribute("Behavior")>
<LocalizableAttribute(True)>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)>
Public Property AutoCompleteCustomSource As AutoCompleteStringCollection
Dim instance As ComboBoxCell
Dim value As AutoCompleteStringCollection
 
instance.AutoCompleteCustomSource = value
 
value = instance.AutoCompleteCustomSource
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.ListCellStringCollectionEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")]
[SRDescription("Indicates the auto complete custom source, which is a custom StringCollection used when the AutoCompleteSource is CustomSource.")]
[MergableProperty(false)]
[SRCategory("Behavior")]
[Localizable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public AutoCompleteStringCollection AutoCompleteCustomSource {get; set;}

Property Value

A System.Collections.Specialized.StringCollection value that represents string candidates that are used with AutoCompleteSource.
Remarks
Refer to the System.Windows.Forms.ComboBox.AutoCompleteCustomSource's remarks.
Example
The following code example shows how to customize a combo box cell's behavior or appearance. This code example is part of a larger example provided for the ComboBoxCell class.
ComboBoxCell CreateAutoCompleteComboBoxCell()
        {
            ComboBoxCell comboBoxCell = new ComboBoxCell();

            comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown;
            comboBoxCell.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            comboBoxCell.AutoCompleteSource = AutoCompleteSource.CustomSource;
            string[] customSourceItems = new string[] { "aaa", "bbb", "ccc", "ddd" };
            comboBoxCell.AutoCompleteCustomSource.AddRange(customSourceItems);

            comboBoxCell.Items.AddRange("(none)", "aaa", "bbb", "ccc", "ddd");

            return comboBoxCell;
        }
Private Function CreateAutoCompleteComboBoxCell() As ComboBoxCell
        Dim comboBoxCell As New ComboBoxCell()

        comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown
        comboBoxCell.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        comboBoxCell.AutoCompleteSource = AutoCompleteSource.CustomSource
        Dim customSourceItems As String() = New String() {"aaa", "bbb", "ccc", "ddd"}
        comboBoxCell.AutoCompleteCustomSource.AddRange(customSourceItems)

        comboBoxCell.Items.AddRange("(none)", "aaa", "bbb", "ccc", "ddd")

        Return comboBoxCell
    End Function
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ComboBoxCell Class
ComboBoxCell Members
DataSource Property
Items Property
AutoCompleteSource Property
AutoCompleteMode Property

 

 


Copyright © GrapeCity, inc. All rights reserved.