For AutoComplete in the designer mode I can specify the DataSource. I never really understood which list is populated in the DataSource drop down when selecting one in the designers mode.
I've been trying to put on my form an item that implements IList or IListSource. But I really don't know how to do that with the designer. Or how to do that with just plain code.
I appreciate any help.
ASArun Srinivasan Syncfusion Team August 6, 2003 08:04 AM
In the AutoCompleteArrayDataSource sample that ships with Essential Tools, the function InitDataSource() demonstrates how you can use an ArrayList (which implements the IList interface) as the DataSource for the the AutoComplete Control.
L.L.A.MarcoAugust 8, 2003 08:46 AM
I'm familiar with the example and I succeed to do it programmatically. It's just that with Studio 2002 I don't see it showing up in the designers view.
PSPrakash S Syncfusion Team August 19, 2003 10:27 AM
The VS.NET Toolbox displays only those Controls & Components that permit it do so using the DesignTimeVisible attribute. Besides, the standard Collection classes that implement the IList interface are neither Control or Component types and hence are not listed in the Toolbox.
If you want to specify a custom IList implementation for the AutoComplete then it would be easiest to just create and add this class programmatically. If design-time support is crucial then you could very well add a custom class to your project that is a 'Component' and also implements the IList interface. You can now add this Component to the VS.NET Toolbox and once it's been added to the Component Tray it can be assigned to the AutoComplete control's DataSource property.