Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataColumnSelectionConverter Class

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

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

[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public class DataColumnSelectionConverter : TypeConverter

Use the DataColumnSelectionConverter class to convert object types before assignment to a control property. In general, the 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 GridView control.

To support converting additional object types, derive a class from DataColumnSelectionConverter 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 DataColumnSelectionConverter class as the type converter for a control property. For example, the RowHeaderColumn property of the GridView control specifies DataColumnSelectionConverter as its type converter.

NoteNote:

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.

System.Object
  System.ComponentModel.TypeConverter
    System.Web.UI.Design.DataColumnSelectionConverter

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

Show:
© 2017 Microsoft