This topic has not yet been rated - Rate this topic

MetaColumn Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a database column that is used by Dynamic Data.

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public class MetaColumn : IFieldFormattingOptions

The MetaColumn type exposes the following members.

  Name Description
Public method MetaColumn Initializes a new instance of the MetaColumn class.
Top
  Name Description
Public property AllowInitialValue Gets or sets a value that specifies whether a column enables a value to be inserted.
Public property ApplyFormatInEditMode Gets a value that indicates whether the formatting string specified by the DataFormatString property is applied to field values when the data-bound control that contains the data field that is represented by the MetaColumn object is in edit mode.
Public property Attributes Gets the collection of metadata attributes that apply to the data field represented by the MetaColumn object.
Public property ColumnType Gets the data field type.
Public property ConvertEmptyStringToNull Gets a value that indicates whether empty string values ("") are automatically converted to null values when the data field is updated in the data source.
Public property DataFormatString Gets the string that specifies the display format for the field value.
Public property DataTypeAttribute Gets the DataTypeAttribute attribute that is applied to the data field.
Public property DefaultValue Gets the default value for the data field.
Public property Description Gets the description for the data field.
Public property DisplayName Gets the display name for the data field.
Public property EntityTypeProperty Gets an object that contains attributes of the property that represents the data field in the entity type.
Public property FilterUIHint Gets the FilterUIHint value that is used for the column.
Public property HtmlEncode Gets a value that indicates whether field values are HTML-encoded before they are displayed in a data-bound control.
Public property IsBinaryData Gets a value that indicates whether the data field contains binary data.
Public property IsCustomProperty Gets a value that indicates whether the data field exists in the database.
Public property IsFloatingPoint Gets a value that indicates whether the data field is a floating-point type.
Public property IsForeignKeyComponent Gets a value that indicates whether the data field is part of a foreign key.
Public property IsGenerated Gets a value that indicates whether the data field value is automatically generated in the database.
Public property IsInteger Gets a value that indicates whether the data field type is an integer type.
Public property IsLongString Gets a value that indicates whether the data field type can contain long strings.
Public property IsPrimaryKey Gets a value that indicates whether the data field is part of the table's primary key.
Public property IsReadOnly Gets a value that indicates whether the data field is read-only.
Public property IsRequired Gets a value that indicates whether the data field requires a value.
Public property IsString Gets a value that indicates whether the data field type is a string type.
Public property MaxLength Gets a value that indicates the maximum length of data that can be stored in the data field.
Public property Model Gets the MetaModel object that represents the data model that this data field belongs to.
Public property Name Gets the name of the data field.
Public property NullDisplayText Gets the caption that is displayed for a field when the field's value is null.
Public property Prompt Gets a value that can be used as a watermark in the UI that is bound to data in the column.
Public property Provider Gets the abstraction provider object that is used to generate the MetaColumn object.
Public property RequiredErrorMessage Gets the error message that is displayed when the data field requires a value but its value is empty.
Public property Scaffold Gets a value that indicates whether the data field should be displayed.
Public property ShortDisplayName Gets the short name for the column.
Public property SortExpression Gets the expression that is used to determine the sort order for the data field.
Public property Table Gets the MetaTable object that represents the table that the data field belongs to.
Public property TypeCode Gets the type of the data field.
Public property UIHint Gets the name of the field template specified for the data field.
Top
  Name Description
Protected method BuildAttributeCollection Gets the attribute collection.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Initialize Initializes data that might not be available when the constructor is called.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ResetMetadata Clears cached column metadata.
Public method ToString Gets the data field name. (Overrides Object.ToString().)
Top
  Name Description
Public Extension Method ConvertEditedValue Returns the value provided by a user for a control that is being validated. (Defined by DynamicDataExtensions.)
Public Extension Method FormatEditValue Formats the specified field value by using the specified formatting options. (Defined by DynamicDataExtensions.)
Public Extension Method FormatValue Formats the specified field value by using the specified formatting options. (Defined by DynamicDataExtensions.)
Public Extension Method GetEnumType Gets the type of the enumeration that represents the column. (Defined by DynamicDataExtensions.)
Top

In ASP.NET Dynamic Data applications, the MetaColumn class represents a database field. The MetaColumn class lets you retrieve information about the data field such as type and metadata information.

You can retrieve the table that the data field belongs to by using the Table property. You can also retrieve the data model by using the Model property.

.NET Framework

Supported in: 4.5, 4, 3.5 SP1

Windows 8 Release Preview, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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.
Did you find this helpful?
(1500 characters remaining)