# Sortierung in ExtJS - shopware-form-field-category-grid

**URL:** <https://forum.shopware.com/t/sortierung-in-extjs-shopware-form-field-category-grid/92133>\
**Category:** Plugins\
**Created:** [29. Dezember 2021 um 14:11 UTC](https://forum.shopware.com/t/sortierung-in-extjs-shopware-form-field-category-grid/92133 "2021-12-29T14:11:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_2812](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Frank\_2812](https://forum.shopware.com/u/Frank_2812)\
**Post date:** [29. Dezember 2021 um 14:12 UTC](https://forum.shopware.com/t/sortierung-in-extjs-shopware-form-field-category-grid/92133/1 "2021-12-29T14:12:00Z")

</div>

Hallo,

in einem eigenen Backend-Formular nutze ich die Komponente shopware-form-field-category-grid,  
um die Katagorien auswählbar zu machen:

```auto
var factory = Ext.create('Shopware.attribute.SelectionFactory');
var categoryStore = factory.createEntitySearchStore('Shopware\\Models\\Category\\Category');
...
categories:
{
        xtype: 'shopware-form-field-category-grid',
        separator: ';',
        store: categoryStore,
        searchStore: categoryStore,
        fieldLabel: 'Kategorien',
        name: 'categories'
},
...

```

Klappt soweit, allerdings kommen die Kategorien in der Auswahlliste unsortiert. Wie kann man die sortieren?

---

<div class="post-metadata">

**Author:** ![Frank\_2812](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Frank\_2812](https://forum.shopware.com/u/Frank_2812)\
**Post date:** [29. Dezember 2021 um 18:28 UTC](https://forum.shopware.com/t/sortierung-in-extjs-shopware-form-field-category-grid/92133/2 "2021-12-29T18:28:49Z")

</div>

Habe noch eine weitere Frage dazu: Ich möchte eine Auswahlbox mit Multi-Select, wie im folgenden Beispiel:

 ![screen](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/0/0d4f19bb90872682535d5e1cf464b5de521328d9.png)

Hat jemand ein Beispiel für mich, wie man ein solches Element im Formular anlegen kann (xtype: ?) ?
