Skip to content
No description or website provided.
JavaScript C# HTML
Branch: 19.1.4+
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Files to look at:

CustomFieldSort - How to Use a Hidden Field to Sort the Visible Field

[Run Online]

This example demonstrates how to sort a field (Sales_Person) by the hidden data field values (LastName).

Check the Enable Custom Sorting box to sort the Sales_Person values by LastName instead of the default alphabetical sorting order.

The enabled check box switches the PivotGridField.SortMode property to the Custom value. This setting allows the PivotGridControl to fire the CustomFieldSort event for that field using the PivotGridSettings.CustomFieldSort property.

The CustomFieldSort handler checks the e.SortLocation property to determine whether the field values are displayed in the pivot grid, or in the filter popup.

If the field is displayed in the pivot grid, the code compares values obtained from the LastName column and assigns the result to the e.Result property.

If the field is displayed in the filter popup, the e.ListSourceRowIndex1 and e.ListSourceRowIndex2 properties are always -1 and cannot be used to indicate the underlying data row. In this situation, the comparison algorithm processes the field value itself.

API in this example:

See also:

You can’t perform that action at this time.