Results 1 to 4 of 4

Thread: autoRender grid editor combos

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2014

    Default Answered: autoRender grid editor combos

    Hello all,

    I have an editable grid that has 4 editable columns. All 4 editors are comboboxes. When one combobox is selected I need to reload the other combos. Think of a Country/State/City scenario where states will reload depending on what country was selected, then the City combo will reload and so forth.

    I listen to the combo "select" event and load the other comboxes accordingly.

    The problem is, if I activate combo editor in Country column only then reload state store, I will get undefined error for the State column editor combobox since it has not yet rendered. If I manually activate all editors then invoke my "select" handler again all works fine. So there is no issue with my code.

    I tried adding autoRender: true but to no avail;

    My grid uses a card layout so can i listen for the activate event and then render all the editor combos?

    I checked the docs and saw all components have a render( ) method but how can I call that if I cant query for a component that has not yet been rendered??

    Or is it possible for me to somehow use the columns renderer function to return my comboboxes instead of the editor config?
    thank you in advance

  2. Looks like you are defining stores of comboboxes inline in combos. Just create the country, state, city stores with grids so the loading of the store/access to the combo stores will not have dependency on combo rendering. Or use Ext.create instead of xtype, then you will have access to all the methods inside. Or define your stores as global stores in the app/store directory and manage them from controller.Do you understand what I mean?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts