Results 1 to 3 of 3

Thread: Grid Bound to "ext-empty-store" Store in initComponent

  1. #1
    Sencha Premium User
    Join Date
    Apr 2010
    Posts
    36
    Answers
    4

    Default Answered: Grid Bound to "ext-empty-store" Store in initComponent

    I have a grid where the store is being bound to a reference created in the viewmodel's "stores" config.

    In my grid's "initComponent", I am trying to catch some of the store's events, but it is not working because the store is a placeholder, where the storeId is "ext-empty-store" and store.isEmptyStore=true.

    When does the grid's store get updated to the bound reference? Does it fire an event when that happens? Is there a different grid function that I should set up the store events on?

    Thank you for the help.

  2. I solved my problem using the grid's "reconfigure" event.

    When the grid reconfigures, I remove listeners from the old store, and add listeners to the new store.

  3. #2
    Sencha Premium User
    Join Date
    Apr 2010
    Posts
    36
    Answers
    4

    Default

    I realize that event-handling is typically done in the controller.

    This grid is a template for all editor grids in my enterprise application, that automatically configures the typical behavior for the grid, like what happens when the Save/New/Delete/Refresh buttons are clicked.

    The goal is that a developer can instantiate this editor grid instead of Ext.grid.Panel, and will automatically have all of the normal behavior already set up and it will all be in 1 class.

  4. #3
    Sencha Premium User
    Join Date
    Apr 2010
    Posts
    36
    Answers
    4

    Default

    I solved my problem using the grid's "reconfigure" event.

    When the grid reconfigures, I remove listeners from the old store, and add listeners to the new store.

Posting Permissions

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