This documentation is archived and is not being maintained.

DataSetFieldSchema Class

Represents the structure, or schema, of a data field.


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

public sealed class DataSetFieldSchema : IDataSourceFieldSchema

The DataSetFieldSchema type exposes the following members.

Public methodDataSetFieldSchemaInitializes a new instance of the DataSetFieldSchema class using a specified DataColumn.

Public propertyDataTypeGets the type of data stored in the data field.
Public propertyIdentityGets a value indicating whether the value of the data field automatically increments for each new row added to the table or view.
Public propertyIsReadOnlyGets a value indicating whether the DataColumn is read-only.
Public propertyIsUniqueGets a value indicating whether values in the data field are required to be unique.
Public propertyLengthGets a value indicating the size of data that can be stored in the data field.
Public propertyNameGets the name of the data field.
Public propertyNullableGets a value indicating whether the data field can accept null values.
Public propertyPrecisionGets the maximum number of digits used to represent a numerical value in the data field.
Public propertyPrimaryKeyGets a value indicating whether the data field is in the primary key for the containing table or view.
Public propertyScaleGets the number of decimal places to which numerical values in the data field are resolved.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Use the DataSetFieldSchema class to get the properties of a data field using a DataColumn. You can discover the structure of a data field by using the following properties in this class: DataType, IsReadOnly, Length, Name, and IsUnique. In addition, you can use the Identity property to determine if a data column is set for AutoIncrement, or the PrimaryKey property to determine if a data column is in the primary key.

The DataSetFieldSchema class is used by custom control designer components to provide information about a data field at design time.

To examine the components of data using a DataSet, use the following classes.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

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