Custom sorting logic

Is is possible to have custom sorting logic  in pivot view? I do not need any aggregation. I need to sort the value from left to right within each row and then top to bottom columnwise and repeat row sorting again. 


Bangalore Trichi Pune Dehradun Kolkata Gujarat
Mumbai 1005 1110 1230 1258 1300 1400
Indore 1200 1204 1290 1305 1350 1380
Delhi 1450 1500 1505 1560 1570 1580
Chennai            
Guragaon 1520 1600 1610 1630 1640 1650

If not possible, can we display the data in the order coming from backend? I can do sorting at backend and bring the data in order but currently the pivot  always displays based on alphabetical order of rows and columns.

Thanks

1 Reply 1 reply marked as answer

SN Sivamathi Natarajan Syncfusion Team June 25, 2020 08:18 AM UTC

 
Thanks for contacting Syncfusion support. 
 
Please find our response. 
 
Query 
Response 
Is it possible to have custom sorting logic  in pivot view? I do not need any aggregation. I need to sort the value from left to right within each row and then top to bottom column wise and repeat row sorting again. 
We would like to inform that the requirement can be achieved through the value sorting feature. And the sorting will be applied to any one axis at a time, either row or column based on where the measure present in the axis. You can mention the axis where the measure to be placed by using the property valueAxis. 
 
 
If not possible, can we display the data in the order coming from backend? I can do sorting at backend and bring the data in order but currently the pivot  always displays based on alphabetical order of rows and columns. 
And you can display the field members in pivot table as what order in the data source. It can be achieved by setting enableSorting property as ‘false’. This is applied commonly for all the fields. So, kindly arrange the fields in data source in desired order to achieve your requirement. 
 
Meanwhile, we have prepared a sample for your reference. Please check the below sample link. Here we have disabled sorting for all fields. 
 
 
 
Please let us know if you have concern. 
 
Regards, 
Sivamathi. 


Marked as answer
Loader.
Up arrow icon