EnableValueSorting in FieldList

Hello

Is it possible to have a value sort on the field list as well as on the table similar to how rows and columns can be sorted:



The reason this would be useful is the following scenario:

1.Pivot table is set up to show table and charts
2.Field List is a fixed field list (not a pop-up) and is displayed side by side with Pivot
3.User is viewing a pivot bar chart of say Amount be country 
4.If user wants to sort by Amount they have to switch back to the table, sort by amount, then back to chart
5.If they could sort directly on the field list this would be much better

Hoping this is possible, or if not you will consider as an enhancement.

Thank you







4 Replies 1 reply marked as answer

SS Saranya Sivan Syncfusion Team March 15, 2021 05:55 PM UTC

  Hi Richard, 
  
We regret you to let you know that reported requirement couldn’t be achievable in pivot table component because the value sort settings can be applied only in pivot table alone. 
  
Meanwhile, your requirement can be achieved by applying value sort settings on a button click. 
  
Please let us know if you have concerns. 
  
Regards, 
Saranya Sivan. 



DI Ditchford March 17, 2021 04:51 AM UTC

Hello

Can you provide a code snippet or sample of applying value sort settings on a button click.

Thanks


SS Saranya Sivan Syncfusion Team March 18, 2021 04:18 PM UTC

Hi Richard, 
  
Based on your requirement we have prepared a sample to add value sort settings on a button click. Please check the below sample for your reference. 
  
Note: Kindly set the value sort settings of the data source settings in the pivot view to achieve the requirement. And, also there is a known issue in applying value sort settings in field list and the fix will be available in Volume 1 release which is estimated to be rolled in the end of March, 2021. 
  
Code Snippet: 
  
        <SfPivotView TValue="ProductDetails" @ref="@PivotView" Height="530" EnableValueSorting=true AllowCalculatedField=true ShowTooltip=false> 
            <PivotViewDataSourceSettings DataSource="@dataSource" EnableSorting=true AllowLabelFilter="true" AllowValueFilter="true"> 
                <PivotViewGridSettings ColumnWidth="120"></PivotViewGridSettings>              
                <PivotViewValueSortSettings HeaderText="@HeaderText" HeaderDelimiter="@HeaderDelimiter" SortOrder="@SortOrder">                                               </PivotViewValueSortSettings> 
            </PivotViewDataSourceSettings> 
        </SfPivotView> 
        <SfPivotFieldList TValue="ProductDetails" @ref="@PivotFieldList" AllowCalculatedField="true" RenderMode="Mode.Fixed"> 
            <PivotFieldListEvents TValue="ProductDetails" EnginePopulated="@EnginePopulated"></PivotFieldListEvents> 
        </SfPivotFieldList> 
  
    public void ValueSort(Microsoft.AspNetCore.Components.Web.MouseEventArgs args) 
    { 
        HeaderText = "FY 2015##Sold"; 
        HeaderDelimiter = "##"; 
        SortOrder = Sorting.Descending;         
    } 
   
  
Please let us know if you have concerns.  
  
Regards, 
Saranya. 




SS Saranya Sivan Syncfusion Team March 31, 2021 05:44 PM UTC

Hi Richard, 
  
We are glad to announce that our Essential Studio 2021 Volume 1 Release v19.1.0.54 is rolled out where the reported issue has been fixed and is available for download under the following link. 
  
 
Now you can apply value sort settings in field list. Meanwhile, we have prepared a sample for your reference. Please check the below sample link. 
  
  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
  
Regards,  
Saranya. 
 


Marked as answer
Loader.
Up arrow icon