Skip to main content
All docs
.NET Framework 4.5.2+

Group List View Data

  • 2 minutes to read

This topic explains how to group List View data, and uses the Department and Position properties created in previous steps to group the Contact List View data.


Before you proceed, take a moment to review the following lesson:

Step-by-Step Instructions

  1. In the MySolution.Module project, open the Model.DesignedDiffs.xafml file in the Model Editor.

  2. Click the Views | MySolution.Module.BusinessObjects | Contact_ListView | Columns node to open the Grid List Editor Designer. Right-click the table header and select the Show Group By Box item.

    Show Group By Box

  3. The Group Panel is displayed.

    Group Panel

  4. Drag the column’s header to the Group Panel to group data by the corresponding field. You can add multiple columns to the group area to create nested groups. Drag the Department and Position columns to the Group Panel.

    Group Panel with columns

  5. Run the application. The Contact List View is grouped by the Department and Position fields and the Group Panel is displayed.

    The grouped Contact List View

  6. Users also can drag columns to and from the Group Panel to group and ungroup List View Data.

    Users can group List View at runtime

Detailed Explanation

Use Column’s GroupIndex to Group Data

When you add a column to the Group Panel the column’s GroupIndex property changes. You can directly specify the column’s GroupIndex property to group List View data. See the following topic for more information: List View Columns Customization.

Prevent Users from Changing Groups

You can hide the Group Panel to prevent users from changing groups. Navigate to the Views | MySolution.Module.BusinessObjects | Contact_ListView node and set its IsGroupPanelVisible property to False.

Next Lesson

Attach Files to Objects