DataSourceConverter Class
Provides a type converter that can retrieve a list of data sources accessible to the current component.
For a list of all members of this type, see DataSourceConverter Members.
System.Object
System.ComponentModel.TypeConverter
System.Web.UI.Design.DataSourceConverter
[Visual Basic] Public Class DataSourceConverter Inherits TypeConverter [C#] public class DataSourceConverter : TypeConverter [C++] public __gc class DataSourceConverter : public TypeConverter [JScript] public class DataSourceConverter extends TypeConverter
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
DataSourceConverter provides methods that can be used to retrieve a list of data sources accessible to the current design-time component.
This type converter is used by Visual Studio .NET to provide the values that appear in the list of data sources in the Properties window.
CAUTION You should never access a type converter directly. Instead, call the appropriate converter by using TypeDescriptor. For more information, see the examples in the TypeConverter base class.
For more information about type converters, see the TypeConverter base class and Implementing a Type Converter.
Example
[Visual Basic] ' Associates the DataSourceConverter with an object property. <TypeConverterAttribute(GetType(DataSourceConverter))> _ Public Property dataSource() As Object Get Return [source] End Get Set [source] = value End Set End Property Private [source] As Object [C#] // Associates the DataSourceConverter with an object property. [TypeConverterAttribute(typeof(DataSourceConverter))] public object dataSource { get { return source; } set { source = value; } } private object source; [C++] // Associates the DataSourceConverter with an Object* property. public: [TypeConverterAttribute(__typeof(DataSourceConverter))] __property Object* get_dataSource() { return source; } __property void set_dataSource(Object* value) { source = value; } private: Object* source;
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Namespace: System.Web.UI.Design
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
Assembly: System.Design (in System.Design.dll)
See Also
DataSourceConverter Members | System.Web.UI.Design Namespace