Export (0) Print
Expand All
Expand Minimize

ListView::GroupItemCount Property

Gets or sets the number of items to display per group in a ListView control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

virtual property int GroupItemCount {
	int get ();
	void set (int value);
<asp:ListView GroupItemCount="Int32" />

Property Value

Type: System::Int32
The number of items to display per group in a ListView control. The default is 1, which indicates that the ListView control will display one item per group.


The GroupItemCount property is set to a value less than 1.

Use the GroupItemCount property to specify the number of items to be grouped together in the ListView control. (In other words, this specifies the number of items to display for each group of the control.) For each group, the ListView control renders the contents of the GroupTemplate template and replaces the item placeholder with the actual item content. It does this as many times as the number of items defined by the GroupItemCount property.

You can use GroupItemCount with the GroupTemplate template to create a tiled layout in the ListView control. In a tiled table layout, the items are repeated horizontally in a row. The numbers of times that an item is repeated is specified by the GroupItemCount property.

The following example shows how to create a tiled layout in the ListView control by using the GroupItemCount property. It also shows how to change this property programmatically.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

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.

© 2014 Microsoft