1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    nir2211 is on a distinguished road

      0  

    Default Unanswered: Validating if the Ext.grid.panel is empty

    Unanswered: Validating if the Ext.grid.panel is empty


    I am trying to create a grid panel, that should highlight the grid in red, (as it happens when the validations fail on other components,) when the grid is empty. Is there a simple solution for this?

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Answers
    31
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Quote Originally Posted by nir2211 View Post
    I am trying to create a grid panel, that should highlight the grid in red, (as it happens when the validations fail on other components,) when the grid is empty. Is there a simple solution for this?
    Define "empty" for a grid panel? No data records as part of its store, or no docked items, etc.?

    If you are talking about data, you could easily check whether the grid's store has data, and then addCls() on the grid to show some kind of validation warning (you could even add a quick tip to it).

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    nir2211 is on a distinguished road

      0  

    Default


    Thanks for the reply. I meant (no of rows = 0 ) when i mentioned empty.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,021
    Answers
    385
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    You may find the grid's getStore() method handy along with store's getCount() method.

Thread Participants: 2

Tags for this Thread