Επεξεργασία

Κοινή χρήση μέσω


ColumnProvider.AddDefaultAttributes Method

Definition

Adds default attributes.

protected:
 static System::ComponentModel::AttributeCollection ^ AddDefaultAttributes(System::Web::DynamicData::ModelProviders::ColumnProvider ^ columnProvider, System::ComponentModel::AttributeCollection ^ attributes);
protected static System.ComponentModel.AttributeCollection AddDefaultAttributes (System.Web.DynamicData.ModelProviders.ColumnProvider columnProvider, System.ComponentModel.AttributeCollection attributes);
static member AddDefaultAttributes : System.Web.DynamicData.ModelProviders.ColumnProvider * System.ComponentModel.AttributeCollection -> System.ComponentModel.AttributeCollection
Protected Shared Function AddDefaultAttributes (columnProvider As ColumnProvider, attributes As AttributeCollection) As AttributeCollection

Parameters

columnProvider
ColumnProvider

The column provider.

attributes
AttributeCollection

The attribute collection.

Returns

The attribute collection.

Remarks

If the attributes parameter does not contain the RequiredAttribute collection, but the model provider requires this attribute, the RequiredAttribute object is added. If the attributes parameter does not contain the StringLengthAttribute collection and the column that is represented by this provider is a string, the StringLengthAttribute object is added.

Applies to