Hi Anu,
Sorry to bother, but can you post that as a .NET 1.1, Visual Studio 2003 project? Our shop isn't up to 2.0 or VS 2005 yet.
Thanks.
>Hi John,
Create the same number of columns as the properties in your IList of custom objects using the Columns property of internal AutoCompleteControl.Or create the number of columns that you would like to display.
this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new Syncfusion.Windows.Forms.Tools.AutoCompleteDataColumnInfo("LongName", 25, true));
this.comboBoxAutoComplete1.AutoCompleteControl.Columns.Add(new Syncfusion.Windows.Forms.Tools.AutoCompleteDataColumnInfo("ShortName", 50, true));
Note that the names of the columns should also be same as the respective property of your custom object.For eg: if you have the property name as ShortName and you want this to be added as a column,then within the parameter of AutoCompleteDataColumnInfo,the name should be ShortName itself.
public string ShortName
//StringName will be displayed in the column Header in the ComboBoxAutoComplete.
{
get
{
return myShortName;
}
}
Also,in order to set the SelectedItem to a particular property,you can set that particular column as the MatchingColumn.
this.comboBoxAutoComplete1.AutoCompleteControl.Columns[1].MatchingColumn = true;
The DataSource, DisplayMember and the ValueMember properties of the ComboBoxAutoComplete control are actually properties from the .NET ComboBox control, since the ComboBoxAutoComplete control internally uses the .NET ComboBox. However, these properties are not useful in the context of a ComboBoxAutoComplete control with an internal AutoComplete, and we recommend you not to use these.
Please take a look at the sample attached and let me know if this does not meet your requirement.
ViewSampleBest Regards,
Anu.