ColumnProvider.AddDefaultAttributes Method

Definition

Adds default attributes.

C#
protected static System.ComponentModel.AttributeCollection AddDefaultAttributes(System.Web.DynamicData.ModelProviders.ColumnProvider columnProvider, System.ComponentModel.AttributeCollection attributes);

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

Proizvod Verzije
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1