Redigera

Dela via


MetaColumn Class

Definition

Represents a database column that is used by Dynamic Data.

public ref class MetaColumn : System::Web::DynamicData::IFieldFormattingOptions
public class MetaColumn : System.Web.DynamicData.IFieldFormattingOptions
type MetaColumn = class
    interface IFieldFormattingOptions
Public Class MetaColumn
Implements IFieldFormattingOptions
Inheritance
MetaColumn
Derived
Implements

Remarks

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.

Constructors

MetaColumn(MetaTable, ColumnProvider)

Initializes a new instance of the MetaColumn class.

Properties

AllowInitialValue

Gets or sets a value that specifies whether a column enables a value to be inserted.

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.

Attributes

Gets the collection of metadata attributes that apply to the data field represented by the MetaColumn object.

ColumnType

Gets the data field type.

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.

DataFormatString

Gets the string that specifies the display format for the field value.

DataTypeAttribute

Gets the DataTypeAttribute attribute that is applied to the data field.

DefaultValue

Gets the default value for the data field.

Description

Gets the description for the data field.

DisplayName

Gets the display name for the data field.

EntityTypeProperty

Gets an object that contains attributes of the property that represents the data field in the entity type.

FilterUIHint

Gets the FilterUIHint value that is used for the column.

HtmlEncode

Gets a value that indicates whether field values are HTML-encoded before they are displayed in a data-bound control.

IsBinaryData

Gets a value that indicates whether the data field contains binary data.

IsCustomProperty

Gets a value that indicates whether the data field exists in the database.

IsFloatingPoint

Gets a value that indicates whether the data field is a floating-point type.

IsForeignKeyComponent

Gets a value that indicates whether the data field is part of a foreign key.

IsGenerated

Gets a value that indicates whether the data field value is automatically generated in the database.

IsInteger

Gets a value that indicates whether the data field type is an integer type.

IsLongString

Gets a value that indicates whether the data field type can contain long strings.

IsPrimaryKey

Gets a value that indicates whether the data field is part of the table's primary key.

IsReadOnly

Gets a value that indicates whether the data field is read-only.

IsRequired

Gets a value that indicates whether the data field requires a value.

IsString

Gets a value that indicates whether the data field type is a string type.

MaxLength

Gets a value that indicates the maximum length of data that can be stored in the data field.

Model

Gets the MetaModel object that represents the data model that this data field belongs to.

Name

Gets the name of the data field.

NullDisplayText

Gets the caption that is displayed for a field when the field's value is null.

Prompt

Gets a value that can be used as a watermark in the UI that is bound to data in the column.

Provider

Gets the abstraction provider object that is used to generate the MetaColumn object.

RequiredErrorMessage

Gets the error message that is displayed when the data field requires a value but its value is empty.

Scaffold

Gets a value that indicates whether the data field should be displayed.

ShortDisplayName

Gets the short name for the column.

SortExpression

Gets the expression that is used to determine the sort order for the data field.

Table

Gets the MetaTable object that represents the table that the data field belongs to.

TypeCode

Gets the type of the data field.

UIHint

Gets the name of the field template specified for the data field.

Methods

BuildAttributeCollection()

Gets the attribute collection.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Initialize()

Initializes data that might not be available when the constructor is called.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ResetMetadata()

Clears cached column metadata.

ToString()

Gets the data field name.

Extension Methods

ConvertEditedValue(IFieldFormattingOptions, String)

Returns the value provided by a user for a control that is being validated.

FormatEditValue(IFieldFormattingOptions, Object)

Formats the specified field value by using the specified formatting options.

FormatValue(IFieldFormattingOptions, Object)

Formats the specified field value by using the specified formatting options.

GetEnumType(MetaColumn)

Gets the type of the enumeration that represents the column.

Applies to

See also