Results 1 to 3 of 3

Thread: column renderer with data from separate store - out of sync

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default column renderer with data from separate store - out of sync

    this is a renderer for a gridpanel column
    Code:
            renderer: function(v){
              var index = this.resellerStore.findExact('id',v);
              var rec = this.resellerStore.getAt(index);
              return rec.get('name');
            },
    Problem is that the store for the data loads after it tries to access it, giving undefined errors.

    I need the renderer to display the name value in the grid based of the id value in grid ( that gets set by roweditors combobox - or from grids own store).

    Any ideas how to solve this?

    I tried :
    Code:
        this.resellerStore.load({
          scope: this,
          callback: function(records, operation, success) {
            if (success) {
               this.store.load();
            }
          }
        });
    But it still end up giving undefined errors in renderer.

  2. #2
    Sencha Premium User
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781

    Question

    I'd like to test this along with you. Can you post a simple test case either inline here or at https://fiddle.sencha.com?


    Regards,
    Brian

  3. #3
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default

    Let me recall what i did there,,Apparently the store loaded after the render (even if the main grid store load was inside a callback).I end up adding the data to the main store in back end and called it with r.get on renderer.

Posting Permissions

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