1. #1
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Kaiserslautern, Germany
    Posts
    7
    Answers
    2
    Vote Rating
    0
    Kotolom is on a distinguished road

      0  

    Default Answered: Changing grid.emptyText on the fly

    Answered: Changing grid.emptyText on the fly


    It seems to be a problem (bug) with emptyText property at all.
    What I'm trying is to change the empty text string depending on some parameters.

    the construct

    Code:
            me.getStore().on(
                    {
                        'load': function(params) {
                            me.emptyText = someParams ? 'assets found' : 'assets not found';
                            Ext.defer(function() { me.getView().refresh(); }, 100);
                        }
                    }
            );
    doesn't work. When I trace emptyText property it is chaged. But it has no effect on shown string.

    Is there known workaround?

  2. Code:
    me.getView().emptyText = 'Foo';

  3. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,989
    Answers
    464
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    What does "me" refer to at this point?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #3
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Kaiserslautern, Germany
    Posts
    7
    Answers
    2
    Vote Rating
    0
    Kotolom is on a distinguished road

      0  

    Default


    What does "me" refer to at this point?
    the grid

  5. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,989
    Answers
    464
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Code:
    me.getView().emptyText = 'Foo';
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Tags for this Thread