The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

[CLOSED] Combobox with grouped items

  1. #1

    [CLOSED] Combobox with grouped items


    I would need a combobox that displays items grouped
    according to a certain field.

    It is something like in the attached image.

    Attachment 24809

    The selectable items must be the ones under the groups, such as "Anzahl_Ankunftsanmeldungen"
    in the example.

    How can I achieve that? I have searched in the examples and in the forums
    but I could not find a solution.

    Thank you.
    Attached Thumbnails combo.jpg  
    Last edited by fabricio.murta; Jan 21, 2017 at 3:52 PM.
  2. #2
    Hello @alessandra.monica!

    This is not a feature ready out-of-the-box, but the way to go is basing your combo box on this example:
    - Form fields > Combo box > Custom Drop Down List

    What should be worked then would be about these lines:
    1. add the grouping field to the combobox store's model
    2. sort the store first by the group column (it could be just a number to represent each group, in the desired order)
    3. then 2nd sort order would be the description, maybe, so you get a list with grouped and ordered items
    4. (maybe the challenge would be here) if first record or the group name/id differs from previous record, then add print the row with the group name as in your screenshot
    5. format the record normally as in the example above

    As it is not a feature nor something supported out-of-the box, we don't really have a ready example on how exactly to do this. But given these directions if you still can't make it work and look as you want, please share how far you gone with it (in a simplified code sample as documented in this thread), we'll do our best to assist you!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thank you Fabricio,

    you can close the thread!
  4. #4
    Hello! Thanks for the feedback and I'm glad we (likely) were able to help you!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 4
    Last Post: Jul 15, 2014, 11:59 AM
  2. Replies: 5
    Last Post: Mar 15, 2013, 5:24 AM
  3. [CLOSED] Problem when inserting items in grouped grid
    By Pablo_Azevedo in forum 1.x Premium Help
    Replies: 3
    Last Post: Jul 24, 2012, 4:46 PM
  4. [CLOSED] ComboBox keyboard navigation for grouped results
    By prointernet in forum 1.x Premium Help
    Replies: 2
    Last Post: Jul 12, 2011, 11:35 AM
  5. Replies: 1
    Last Post: May 09, 2011, 10:34 AM

Posting Permissions