1. #1
    Ext User
    Join Date
    Oct 2007
    Location
    Central England
    Posts
    169
    Vote Rating
    0
    tjcrowder is on a distinguished road

      0  

    Default [2.0b1] GridView emptyText feature

    [2.0b1] GridView emptyText feature


    Hi all,

    I wanted to show a message in my grid when it was empty, e.g. "No nifty thingies defined" or something. I figured the grid had to have this feature, but I didn't see it in the docs, so I set about trying to figure out what element the body of the grid was (not including the column headers, so not the GridPanel's "body" element) so I could float something above it or just fill it in, etc.

    Which lead me to poking around GridPanel.js and GridView.js -- whereupon I found, in GridView, some handling for an "emptyText" data member if it's defined. Excited, I played with it a bit, and found that indeed if I set an emptyText property on the GridView...
    Code:
    myGridPanel.getView().emptyText = 'No nifty thingies defined...';
    ...that text gets displayed when the grid is next loaded if there are no records, and isn't displayed if there are records! Exactly what I wanted!

    There are no setters/getters (so for instance, if you want to change the empty text, you have to change the property and then either cause a reload or -- if you're feeling really cheeky -- call the GridView.applyEmptyText private internal might-change-at-any-moment method), and it's not documented, nor is it available via config options. So I'm wondering whether this is something that's not quite complete but is planned, or someone got half-way done and got distracted, or...?

    Thanks in advance,
    T.J. Crowder
    tj / crowdersoftware / com

  2. #2

  3. #3
    Ext User
    Join Date
    Oct 2007
    Location
    Central England
    Posts
    169
    Vote Rating
    0
    tjcrowder is on a distinguished road

      0  

    Default


    Ah, thanks Tim! Good news, it'll be documented (for us non-SVN plebes) soon, and for the casual readers of this thread two points:

    • It is exposed as a config item, it's just a config item for the view, not the grid, so put it in viewConfig.
    • It's even marked up with the x-grid-empty style, so if you want to change the default styling, it's easy to do.

    Very nice.
    T.J. Crowder
    tj / crowdersoftware / com

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi