Results 1 to 10 of 12

Thread: clear grid totaly

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    6
    Vote Rating
    0
      0  

    Default clear grid totaly

    Hi
    I use a grid and the contents change dynamically, I would like to empty the grid during the loading, i.e. that the contents are white. How I must make?

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    dataModel.removeAll() might just work.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    6
    Vote Rating
    0
      0  

    Default

    It's ok, thx!!
    But, i don't find in the javadoc... Is this normal?

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
      0  

    Default

    It's marked private in DefaultDataModel - not sure that it needs to be private any longer.

  5. #5
    Ext JS Premium Member NoahK17's Avatar
    Join Date
    Apr 2008
    Location
    Atlanta, GA
    Posts
    518
    Vote Rating
    1
      0  

    Default

    And if you stumbled upon this thread and are looking for information on how to clear out a grid (content) using ExtJS 3.0+, the command is simply... "grid.store.removeAll();" where "grid" is your grid component.

    Cheers!
    Noah
    Senior Web Developer
    NBA.com

  6. #6
    Sencha User
    Join Date
    Sep 2010
    Posts
    1
    Vote Rating
    0
      0  

    Default

    but that doesn't clear out the paging toolbar that has the old data count. Any idea how to clear that as well? I am error handling and would like to clear it all out in the event of a loadexception. Thanks.

  7. #7
    Sencha User iwosz's Avatar
    Join Date
    May 2010
    Posts
    25
    Vote Rating
    0
      0  

    Question Re

    I have the same problem with paging toolbar. When I load 500 records with 50 on page (so there are 10 pages) it creates list of 50 records and all default store methods works only with this 50 records... But I want to use all 500 records in the store but view only 50 on one page, is it possible? I mean for me Pager should only change display, not data... so when I use store.removeAll() I want to remove all 500 records
    greets,

    iwosz.

  8. #8
    Sencha User mkariti's Avatar
    Join Date
    Aug 2011
    Posts
    92
    Vote Rating
    0
      0  

    Default

    Hi there,
    Did anyone managed to over come this?
    I'm in the same pit as well.
    mkariti

Similar Threads

  1. Clear grid's sort arrow icon
    By SLerman in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 5 Oct 2011, 5:49 AM
  2. Fire clear event when Store is empty?
    By aconran in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Feb 2007, 4:39 PM

Posting Permissions

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