DisplayAttribute.GroupName Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets either a resource name or non-localized text that is displayed to users when grouping fields in the user interface.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

Syntax

'Declaration
Public Property GroupName As String
public string GroupName { get; set; }

Property Value

Type: System.String
Either a resource name or the non-localized text that is displayed to users when grouping fields in the user interface. The resource name is used with the ResourceType property to retrieve localized text that is displayed to users when grouping fields in the user interface.

Remarks

Set the GroupName property to either a literal non-localized string or to a resource key to use with the ResourceType property to retrieve a localized group name.

Do not use the get accessor of the GroupName property to retrieve the text to display in your Silverlight application. Instead, use the GetGroupName method to retrieve the group name to display. The GetGroupName method returns either the literal non-localized string or the localized string when a resource type has been specified.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.