System.Web.UI.Design.DataColumnSelectionConverter Class

Provides a type converter for a property representing the field name of a bound column field in a System.Web.UI.WebControls.GridView control.

See Also: DataColumnSelectionConverter Members

Syntax

public class DataColumnSelectionConverter : System.ComponentModel.TypeConverter

Remarks

Use the System.Web.UI.Design.DataColumnSelectionConverter class to convert object types before assignment to a control property. In general, the System.Web.UI.Design.DataColumnSelectionConverter class 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 field names for bound column fields for the current System.Web.UI.WebControls.GridView control.

To support converting additional object types, derive a class from System.Web.UI.Design.DataColumnSelectionConverter and override the DataColumnSelectionConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, Type) and DataColumnSelectionConverter.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 DataColumnSelectionConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext) method.

Apply the System.ComponentModel.TypeConverterAttribute attribute to specify the System.Web.UI.Design.DataColumnSelectionConverter class as the type converter for a control property. For example, the System.Web.UI.WebControls.GridView.RowHeaderColumn property of the System.Web.UI.WebControls.GridView control specifies System.Web.UI.Design.DataColumnSelectionConverter as its 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.DataColumnSelectionConverter.GetStandardValuesSupported method indicates that the converter supports returning a list of available values through the erload:System.Web.UI.Design.DataColumnSelectionConverter.GetStandardValues method. The erload:System.Web.UI.Design.DataColumnSelectionConverter.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