Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
igCombo grouping by non-alphabetical order
posted

I am using an igCombo to sort a list of items by their types, the user wants them in an non-alphabetical order, I can give it an array with the items in the order i want. Currently we are just appending numbers before the key used to group to make them appear in the correct order, but that is hopefully a temporary fix. Is there a template of some sort i can use for the group headers so that i can leave the numbers in for sorting purposes but have the numbers not show in the list, or is there some way to group and not have the groups in asc/desc order? I will say i did try having the direction of sorting be a blank string and that does give me the result i want sometimes, but it doesn't always work properly and it can cause some issues with selecting one to display. (sometimes instead of displaying correctly it will split the groups up in a seemingly random fashion, the groups are duplicated and split up in the combo, i am assuming empty direction is an unsupported usage)

  • 20120
    Offline posted

    Hey Clayton,

    Thank you for contacting us!

    Empty direction is not an option, yes. As you can see from our API documentation, direction receives only ASC and DESC values, it is enumeration.

    As for the workaround of the described scenario, you may create a field that will be used exactly for sorting purposes. it wont be visible in the template, and there you can show only the values that you want.

    I assume you already checked our online sample that is showing how to apply grouping in the header template of the combo:

    https://www.igniteui.com/combo/grouping

    If you have any further questions, please do let me know.