- Home
- Forum
- Angular - EJ 2
- Sorting the inner items of grouped items in descending order
Sorting the inner items of grouped items in descending order
HI Team,
I have a requirement where i need to group a list of items in a list view based on date and then sort them descending order
The grouped item as a whole is sorting in descending but the inner items inside the grouped objects are not sorting in descending.
Need help on this asap.
Thanks,
Aditya
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
SP
Sowmiya Padmanaban
Syncfusion Team
October 15, 2020 01:00 PM UTC
Hi Aditya Murthy,
Greetings from Syncfusion support.
We have checked your requirement with ListView component. You can achieve your requirement by using SortOrder property of ListView component.
Refer the below code snippet.
|
<ejs-listview
id="listview"
[dataSource]="data"
[sortOrder]="sortOrder"
[fields]="fields"
[headerTitle]="headerTitle"
[showIcon]="true"
[showHeader]="true"
></ejs-listview>
public fields: { [key: string]: string } = {
iconCss: "icon",
tooltip: "text",
groupBy: "category"
};
public sortOrder: string = "Descending"; |
Refer the sample link below.
Refer to the below links to know more about the ListView component.
UG Documentation- https://ej2.syncfusion.com/angular/documentation/listview/grouping/
Please let us know, if you need any further assistance.
Regards,
Sowmiya.P
Marked as answer
Hi Aditya Murthy,Greetings from Syncfusion support.We have checked your requirement with ListView component. You can achieve your requirement by using SortOrder property of ListView component.Refer the below code snippet.
<ejs-listviewid="listview"[dataSource]="data"[sortOrder]="sortOrder"[fields]="fields"[headerTitle]="headerTitle"[showIcon]="true"[showHeader]="true"></ejs-listview>public fields: { [key: string]: string } = {iconCss: "icon",tooltip: "text",groupBy: "category"};public sortOrder: string = "Descending";Refer the sample link below.Refer to the below links to know more about the ListView component.UG Documentation- https://ej2.syncfusion.com/angular/documentation/listview/grouping/Please let us know, if you need any further assistance.Regards,Sowmiya.P
This helped me a lot and the solution worked
Thanks,
Aditya
SP
Sowmiya Padmanaban
Syncfusion Team
October 19, 2020 04:08 AM UTC
Hi Aditya,
Most Welcome. We are happy to hear that your problem has been resolved. Please contact us, if you need any help from us.
Regards,
Sowmiya.P
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
AM Aditya Murthy
- Oct 14, 2020 11:31 AM UTC
- Oct 19, 2020 04:08 AM UTC