ColumnProvider::AddDefaultAttributes Method (ColumnProvider^, AttributeCollection^)

.NET Framework (current version)
 

Adds default attributes.

Namespace:   System.Web.DynamicData.ModelProviders
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

protected:
static AttributeCollection^ AddDefaultAttributes(
	ColumnProvider^ columnProvider,
	AttributeCollection^ attributes
)

Parameters

columnProvider
Type: System.Web.DynamicData.ModelProviders::ColumnProvider^

The column provider.

attributes
Type: System.ComponentModel::AttributeCollection^

The attribute collection.

Return Value

Type: System.ComponentModel::AttributeCollection^

The attribute collection.

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.

.NET Framework
Available since 4.0
Return to top
Show: