Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MetaForeignKeyColumn Class

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.

  NameDescription
Public methodMetaForeignKeyColumnInitializes a new instance of the MetaForeignKeyColumn class.
Top
  NameDescription
Public propertyAllowInitialValueGets or sets a value that specifies whether a column enables a value to be inserted. (Inherited from MetaColumn.)
Public propertyApplyFormatInEditModeGets 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 propertyAttributesGets the collection of metadata attributes that apply to the data field represented by the MetaColumn object. (Inherited from MetaColumn.)
Public propertyColumnTypeGets the data field type. (Inherited from MetaColumn.)
Public propertyConvertEmptyStringToNullGets 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 propertyDataFormatStringGets the string that specifies the display format for the field value. (Inherited from MetaColumn.)
Public propertyDataTypeAttributeGets the DataTypeAttribute attribute that is applied to the data field. (Inherited from MetaColumn.)
Public propertyDefaultValueGets the default value for the data field. (Inherited from MetaColumn.)
Public propertyDescriptionGets the description for the data field. (Inherited from MetaColumn.)
Public propertyDisplayNameGets the display name for the data field. (Inherited from MetaColumn.)
Public propertyEntityTypePropertyGets an object that contains attributes of the property that represents the data field in the entity type. (Inherited from MetaColumn.)
Public propertyFilterUIHintGets the FilterUIHint value that is used for the column. (Inherited from MetaColumn.)
Public propertyForeignKeyNamesGets a collection that contains the names of the foreign keys in the association that represents a database relationship.
Public propertyHtmlEncodeGets a value that indicates whether field values are HTML-encoded before they are displayed in a data-bound control. (Inherited from MetaColumn.)
Public propertyIsBinaryDataGets a value that indicates whether the data field contains binary data. (Inherited from MetaColumn.)
Public propertyIsCustomPropertyGets a value that indicates whether the data field exists in the database. (Inherited from MetaColumn.)
Public propertyIsFloatingPointGets a value that indicates whether the data field is a floating-point type. (Inherited from MetaColumn.)
Public propertyIsForeignKeyComponentGets a value that indicates whether the data field is part of a foreign key. (Inherited from MetaColumn.)
Public propertyIsGeneratedGets a value that indicates whether the data field value is automatically generated in the database. (Inherited from MetaColumn.)
Public propertyIsIntegerGets a value that indicates whether the data field type is an integer type. (Inherited from MetaColumn.)
Public propertyIsLongStringGets a value that indicates whether the data field type can contain long strings. (Inherited from MetaColumn.)
Public propertyIsPrimaryKeyGets a value that indicates whether the data field is part of the table's primary key. (Inherited from MetaColumn.)
Public propertyIsPrimaryKeyInThisTableGets a value that indicates whether the foreign-key field is part of the primary key of the table.
Public propertyIsReadOnlyGets a value that indicates whether the data field is read-only. (Inherited from MetaColumn.)
Public propertyIsRequiredGets a value that indicates whether the data field requires a value. (Inherited from MetaColumn.)
Public propertyIsStringGets a value that indicates whether the data field type is a string type. (Inherited from MetaColumn.)
Public propertyMaxLengthGets a value that indicates the maximum length of data that can be stored in the data field. (Inherited from MetaColumn.)
Public propertyModelGets the MetaModel object that represents the data model that this data field belongs to. (Inherited from MetaColumn.)
Public propertyNameGets the name of the data field. (Inherited from MetaColumn.)
Public propertyNullDisplayTextGets the caption that is displayed for a field when the field's value is null. (Inherited from MetaColumn.)
Public propertyParentTableGets the parent table of the foreign-key field.
Public propertyPromptGets a value that can be used as a watermark in the UI that is bound to data in the column. (Inherited from MetaColumn.)
Public propertyProviderGets the abstraction provider object that is used to generate the MetaColumn object. (Inherited from MetaColumn.)
Public propertyRequiredErrorMessageGets the error message that is displayed when the data field requires a value but its value is empty. (Inherited from MetaColumn.)
Public propertyScaffoldGets a value that indicates whether the data field should be displayed. (Inherited from MetaColumn.)
Public propertyShortDisplayNameGets the short name for the column. (Inherited from MetaColumn.)
Public propertySortExpressionGets the expression that is used to determine the sort order for the data field. (Inherited from MetaColumn.)
Public propertyTableGets the MetaTable object that represents the table that the data field belongs to. (Inherited from MetaColumn.)
Public propertyTypeCodeGets the type of the data field. (Inherited from MetaColumn.)
Public propertyUIHintGets the name of the field template specified for the data field. (Inherited from MetaColumn.)
Top
  NameDescription
Protected methodBuildAttributeCollectionGets the attribute collection. (Inherited from MetaColumn.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExtractForeignKeySaves the value of a foreign key in the specified dictionary.
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 methodGetFilterExpressionReturns the alternate name that is mapped to a foreign key.
Public methodGetForeignKeyDetailsPathGets the path for the details action page of the parent table of the specified foreign-key field.
Public methodGetForeignKeyPath(String, Object)Gets the path for the specified action page of the parent table of the specified foreign-key field.
Public methodGetForeignKeyPath(String, Object, String)Gets the path for the specified action page of the parent table of the specified foreign-key field.
Public methodGetForeignKeyStringRetrieves a comma-separated list of values that represent the foreign-key for the specified row.
Public methodGetForeignKeyValuesRetrieves a collection of values that represent the foreign keys for the specified row.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInitializeInitializes data that may not be available when the constructor is called. (Overrides MetaColumn.Initialize().)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodResetMetadataClears cached column metadata. (Inherited from MetaColumn.)
Public methodToStringGets the data field name. (Inherited from MetaColumn.)
Top
  NameDescription
Public Extension MethodGetEnumTypeGets 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.5.1, 4.5, 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), 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)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.