New to Telerik UI for WinForms? Start a free 30-day trial
How to Sort Fields Section in the RadPivotFieldList
Updated over 6 months ago
Environment
| Product Version | Product | Author |
|---|---|---|
| 2023.2.718 | RadPivotGrid for WinForms | Dinko Krastev |
Description
An example demonstrating how to sort fields section in the RadPivotFieldList.

Solution
The RadPivotFieldList internally hosts a RadTreeView control responsible for displaying the logical ContainerNodes objects. In order to have the items sorted, you would need to define a SortOrder to the RadPivotFieldList.FieldsControl object. A suitable place to perform this task is the event handler of the RadPivotGrid.UpdateCompleted event.
C#
private void radPivotGrid1_UpdateCompleted(object sender, EventArgs e)
{
this.radPivotFieldList1.FieldsControl.SortOrder = System.Windows.Forms.SortOrder.Ascending;
}