System.Web.UI.Design.DataSourceViewSchemaConverter Class

Provides a type converter for a property representing a field in a data source schema.

See Also: DataSourceViewSchemaConverter Members

Syntax

public class DataSourceViewSchemaConverter : System.ComponentModel.TypeConverter

Remarks

Use the System.Web.UI.Design.DataSourceViewSchemaConverter class to convert object types before assignment to a control property. In general, the System.Web.UI.Design.DataSourceViewSchemaConverter supports converting string object types and supplies a list of standard values available for assignment to the associated control property. The standard values collection is the list of fields in the data source schema for the current control.

To support converting additional object types, derive a class from System.Web.UI.Design.DataSourceViewSchemaConverter and override the DataSourceViewSchemaConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, Type) and DataSourceViewSchemaConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, object) methods for the additional object types. To support a custom list of standard assignable values, override the DataSourceViewSchemaConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext) method.

Apply the System.ComponentModel.TypeConverterAttribute attribute to specify the System.Web.UI.Design.DataSourceViewSchemaConverter class as the type converter for a control property. For example, the System.Web.UI.WebControls.DataControlField.SortExpression property of the System.Web.UI.WebControls.DataControlField class and the System.Web.UI.WebControls.BoundField.DataField property of the System.Web.UI.WebControls.BoundField class use the System.Web.UI.Design.DataSourceViewSchemaConverter as the property type converter.

Note:

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

The erload:System.Web.UI.Design.DataSourceViewSchemaConverter.GetStandardValuesSupported method indicates that the converter supports returning a list of available values through the erload:System.Web.UI.Design.DataSourceViewSchemaConverter.GetStandardValues method. The erload:System.Web.UI.Design.DataSourceViewSchemaConverter.GetStandardValuesExclusive method indicates that the list is not an exclusive list of possible values.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0