We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display Order of Group Items in DropDownList

Thread ID:





149367 Nov 22,2019 10:43 PM UTC Nov 25,2019 05:25 AM UTC Angular - EJ 2 1
Tags: DropDownList
Asked On November 22, 2019 10:43 PM UTC

Sir, how do I set the order in which the group items are displayed in the drop down list.

From the image below. How can I set the group heading 'Beans' to appear before' Leafy And Salad.

I can not work out how your algorithm determines the grouping order. It is not alphabetical.  All I an trying to achieve is as a "Common" group and and a 'Infrequent' group, so that of a list of 50 items, the most commonly selected ~ 8 items are shown first. But no matter what alphabetical labels I give them, your algorithm always seems to display the largest group 'Infrequant' first in the list.

Sevvandhi Nagulan [Syncfusion]
Replied On November 25, 2019 05:25 AM UTC

Hi James, 

Greetings from Syncfusion support. 

We would like to inform you that, the grouping header will be created as per the data given in the dataSource. You can use the sortOrder property to sort the header whether in ascending or desending. Please refer the code snippet, 

<ejs-dropdownlist #grouping id='vegetables' [dataSource]='vegetableData' [placeholder]='groupWaterMark' [fields]='groupFields' [popupHeight]='height' [sortOrder]='sort'></ejs-dropdownlist> 

public sort: string = 'Ascending'; 

Sevvandhi N 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon