Multi grouping in dropdownlist

Hello,

I would like to know if it is possible to have several grouping parameters in the dropdownlist
I have this class :
Appellation{
     public string IdAppellation { get; set; }
     public string NameAppellation { get; set; }
     public string ColorAppellation { get; set; }
     public string CategoryAppellation { get; set; }
}

And I would like to group by category and color like :
  • Red - AOP
  • White - AOP
  • Red - IGP...
I use this code to generate my dropdownlist
@Html.EJS().DropDownList("appellation").DataSource(Model.LineInputViewModel.ListAppellation).Fields(new DropDownListFieldSettings{GroupBy = "CategoryAppellation", Text = "NameAppellation", Value = "IdAppellation" }).Render()

Thank you for your answers

1 Reply 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team February 25, 2021 01:39 PM UTC

Hi Chaffois, 

Greetings from Syncfusion support. 

We checked your reported query. We would like to inform you that the DropDownList component supports wrapping nested elements into a group based on different categories. The different items under same category will be grouped and also the category name must be unique. For example, if the color AOP and IGP will be grouped under the category name Red, because the different items (AOP, IGP) under the same category(Red) will be grouped as per the behaviour. 

Kindly check with the above suggestion. If you need further assistance, please revert us with more information with expected output pictorial representation, which helps us to check and provide you the solution at earliest. 

Regards, 
Ponmani M 


Marked as answer
Loader.
Up arrow icon