DataSourceViewSchemaConverter Class
Assembly: System.Design (in system.design.dll)
Use the DataSourceViewSchemaConverter class to convert object types before assignment to a control property. In general, the 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 DataSourceViewSchemaConverter and override the CanConvertFrom and ConvertFrom methods for the additional object types. To support a custom list of standard assignable values, override the GetStandardValues method.
Apply the TypeConverterAttribute attribute to specify the DataSourceViewSchemaConverter class as the type converter for a control property. For example, the SortExpression property of the DataControlField class and the DataField property of the BoundField class use the DataSourceViewSchemaConverter as the property type converter.
Note: |
|---|
| You should never access a type converter directly. Instead, call the appropriate converter by using a TypeDescriptor object. For more information, see the examples in TypeConverter. |
The GetStandardValuesSupported method indicates that the converter supports returning a list of available values through the GetStandardValues method. The GetStandardValuesExclusive method indicates that the list is not an exclusive list of possible values.
- SecurityPermission for calling unmanaged code. Demand value: Demand; Associated enumeration: UnmanagedCode.
System.ComponentModel.TypeConverter
System.Web.UI.Design.DataSourceViewSchemaConverter
System.Web.UI.Design.DataSourceBooleanViewSchemaConverter
Note: