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.

DataFieldConverter Class

Provides a type converter that can retrieve a list of data fields from the current component's selected data source.

For a list of all members of this type, see DataFieldConverter Members.

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

[Visual Basic]
Public Class DataFieldConverter
   Inherits TypeConverter
[C#]
public class DataFieldConverter : TypeConverter
[C++]
public __gc class DataFieldConverter : public TypeConverter
[JScript]
public class DataFieldConverter extends TypeConverter

Thread Safety

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

Remarks

DataFieldConverter can retrieve a list of data fields from the current data source of a design-time component.

This type converter is used by Visual Studio .NET to provide the values that appear in the list of data fields in the Properties window.

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

For more information about type converters, see the TypeConverter base class and Implementing a Type Converter.

Example

[Visual Basic] 
' Associates the DataFieldConverter with a string property.   
<TypeConverterAttribute(GetType(DataMemberConverter))>  _
Public Property dataField() As String
   Get
      Return field
   End Get
   Set
      field = value
   End Set
End Property
Private field As String

[C#] 
// Associates the DataFieldConverter with a string property.
[TypeConverterAttribute(typeof(DataMemberConverter))]
public string dataField
{
    get
    {
        return field;
    }
    set
    {
        field = value;
    }
}
private string field;

[C++] 
// Associates the DataFieldConverter with a String* property.
public:
[TypeConverterAttribute(__typeof(DataMemberConverter))]
__property String* get_dataField() {
   return field;
}
__property void set_dataField(String* value) {
   field = value;
}

private:
String*  field;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Web.UI.Design

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Design (in System.Design.dll)

See Also

DataFieldConverter Members | System.Web.UI.Design Namespace

Show:
© 2014 Microsoft. All rights reserved.