This topic has not yet been rated - Rate this topic

MetaForeignKeyColumn Class

Updated: July 2008

Represents a database foreign-key field that is used by ASP.NET Dynamic Data.

System.Object
  System.Web.DynamicData.MetaColumn
    System.Web.DynamicData.MetaForeignKeyColumn

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)
public class MetaForeignKeyColumn : MetaColumn

The MetaForeignKeyColumn type exposes the following members.

  Name Description
Public method MetaForeignKeyColumn Initializes a new instance of the MetaForeignKeyColumn class.
Top
  Name Description
Public property AllowInitialValue Gets or sets a value that specifies whether a column enables a value to be inserted. (Inherited from MetaColumn.)
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. (Inherited from MetaColumn.)
Public property Attributes Gets the collection of metadata attributes that apply to the data field represented by the MetaColumn object. (Inherited from MetaColumn.)
Public property ColumnType Gets the data field type. (Inherited from MetaColumn.)
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. (Inherited from MetaColumn.)
Public property DataFormatString Gets the string that specifies the display format for the field value. (Inherited from MetaColumn.)
Public property DataTypeAttribute Gets the DataTypeAttribute attribute that is applied to the data field. (Inherited from MetaColumn.)
Public property DefaultValue Gets the default value for the data field. (Inherited from MetaColumn.)
Public property Description Gets the description for the data field. (Inherited from MetaColumn.)
Public property DisplayName Gets the display name for the data field. (Inherited from MetaColumn.)
Public property EntityTypeProperty Gets an object that contains attributes of the property that represents the data field in the entity type. (Inherited from MetaColumn.)
Public property FilterUIHint Gets the FilterUIHint value that is used for the column. (Inherited from MetaColumn.)
Public property ForeignKeyNames Gets a collection that contains the names of the foreign keys in the association that represents a database relationship.
Public property HtmlEncode Gets a value that indicates whether field values are HTML-encoded before they are displayed in a data-bound control. (Inherited from MetaColumn.)
Public property IsBinaryData Gets a value that indicates whether the data field contains binary data. (Inherited from MetaColumn.)
Public property IsCustomProperty Gets a value that indicates whether the data field exists in the database. (Inherited from MetaColumn.)
Public property IsFloatingPoint Gets a value that indicates whether the data field is a floating-point type. (Inherited from MetaColumn.)
Public property IsForeignKeyComponent Gets a value that indicates whether the data field is part of a foreign key. (Inherited from MetaColumn.)
Public property IsGenerated Gets a value that indicates whether the data field value is automatically generated in the database. (Inherited from MetaColumn.)
Public property IsInteger Gets a value that indicates whether the data field type is an integer type. (Inherited from MetaColumn.)
Public property IsLongString Gets a value that indicates whether the data field type can contain long strings. (Inherited from MetaColumn.)
Public property IsPrimaryKey Gets a value that indicates whether the data field is part of the table's primary key. (Inherited from MetaColumn.)
Public property IsPrimaryKeyInThisTable Gets a value that indicates whether the foreign-key field is part of the primary key of the table.
Public property IsReadOnly Gets a value that indicates whether the data field is read-only. (Inherited from MetaColumn.)
Public property IsRequired Gets a value that indicates whether the data field requires a value. (Inherited from MetaColumn.)
Public property IsString Gets a value that indicates whether the data field type is a string type. (Inherited from MetaColumn.)
Public property MaxLength Gets a value that indicates the maximum length of data that can be stored in the data field. (Inherited from MetaColumn.)
Public property Model Gets the MetaModel object that represents the data model that this data field belongs to. (Inherited from MetaColumn.)
Public property Name Gets the name of the data field. (Inherited from MetaColumn.)
Public property NullDisplayText Gets the caption that is displayed for a field when the field's value is null. (Inherited from MetaColumn.)
Public property ParentTable Gets the parent table of the foreign-key field.
Public property Prompt Gets a value that can be used as a watermark in the UI that is bound to data in the column. (Inherited from MetaColumn.)
Public property Provider Gets the abstraction provider object that is used to generate the MetaColumn object. (Inherited from MetaColumn.)
Public property RequiredErrorMessage Gets the error message that is displayed when the data field requires a value but its value is empty. (Inherited from MetaColumn.)
Public property Scaffold Gets a value that indicates whether the data field should be displayed. (Inherited from MetaColumn.)
Public property ShortDisplayName Gets the short name for the column. (Inherited from MetaColumn.)
Public property SortExpression Gets the expression that is used to determine the sort order for the data field. (Inherited from MetaColumn.)
Public property Table Gets the MetaTable object that represents the table that the data field belongs to. (Inherited from MetaColumn.)
Public property TypeCode Gets the type of the data field. (Inherited from MetaColumn.)
Public property UIHint Gets the name of the field template specified for the data field. (Inherited from MetaColumn.)
Top
  Name Description
Protected method BuildAttributeCollection Gets the attribute collection. (Inherited from MetaColumn.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExtractForeignKey Saves the value of a foreign key in the specified dictionary.
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 GetFilterExpression Returns the alternate name that is mapped to a foreign key.
Public method GetForeignKeyDetailsPath Gets the path for the details action page of the parent table of the specified foreign-key field.
Public method GetForeignKeyPath(String, Object) Gets the path for the specified action page of the parent table of the specified foreign-key field.
Public method GetForeignKeyPath(String, Object, String) Gets the path for the specified action page of the parent table of the specified foreign-key field.
Public method GetForeignKeyString Retrieves a comma-separated list of values that represent the foreign-key for the specified row.
Public method GetForeignKeyValues Retrieves a collection of values that represent the foreign keys for the specified row.
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 may not be available when the constructor is called. (Overrides MetaColumn.Initialize().)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ResetMetadata Clears cached column metadata. (Inherited from MetaColumn.)
Public method ToString Gets the data field name. (Inherited from MetaColumn.)
Top
  Name Description
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 MetaForeignKeyColumn class represents a database column that denotes a one-to-one relationship.

The MetaForeignKeyColumn class represents the column in the table that contains the foreign-key field. However, you can access the parent table object by using the ParentTable property. You can determine if the foreign-key field is a primary key in the table that contains it by using the IsPrimaryKeyInThisTable property.

.NET Framework

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, 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.

Date

History

Reason

July 2008

Added topic for new class.

SP1 feature change.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ