Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
HierarchicalDataSourceConverter Class
Collapse the table of content
Expand the table of content

HierarchicalDataSourceConverter Class

Note: This class is new in the .NET Framework version 2.0.

Provides a type converter that can retrieve a list of the hierarchical data sources that are accessible to the current component.

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

public class HierarchicalDataSourceConverter : DataSourceConverter
public class HierarchicalDataSourceConverter extends DataSourceConverter
public class HierarchicalDataSourceConverter extends DataSourceConverter

The HierarchicalDataSourceConverter class provides methods that can be used to retrieve a list of the hierarchical data sources that are accessible to the current design-time component.

The HierarchicalDataSourceConverter type converter is used by Microsoft Visual Studio to provide the values that appear in the list of data sources in the Properties window.

Caution noteCaution

You should never access a type converter directly. Instead, call the appropriate converter by using the TypeDescriptor class. For more information, see the examples in TypeConverter.

For more information about type converters, see the TypeConverter base class and How to: Implement a Type Converter.

The following code example demonstrates how to associate a HierarchicalDataSourceConverter with a hierarchical data source property that is contained within a custom control.

ToolboxData("<{0}:MyCustomHierarchicalControl runat=server> </{0}:MyCustomHierarchicalControl>")
public class MyCustomHierarchicalControl : TreeView 
    private object _dataSource;

    public override object DataSource
            return _dataSource;
            if (value != null) 
            _dataSource = value;

    // Define rest of custom control implementation.
    // ...



Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
© 2015 Microsoft