Results 1 to 4 of 4

Thread: How to clear gridpanel/records???

  1. #1
    Sencha Premium Member Edd's Avatar
    Join Date
    Jan 2012
    Posts
    31
    Vote Rating
    0
      0  

    Question How to clear gridpanel/records???

    Hi all,

    I'm working with some grids, let's say that I have 3 grids:
    on selection change in grid 1, a store.load is executed, loading data in grid 2.
    But, on selection change in grid 3 I want to clear the grid 2,
    I tried: store.remove, removeAll and some others, but the data is still there :S


    Also I wanna know if it's possible to do this:
    A gridpanel, with a column "Message" and given some values like 0 or 1 I wanna align the message like most mobile phones messages style. (if value ==0; align=left) (if value==1; align=right).

    Messages
    Message1
    Message2
    Message3


    Any suggestions? Thanks in advance.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    store.removeAll will work if store is the correct store.

    For the aligning, you can use a column renderer and add a style to the meta argument. http://docs.sencha.com/ext-js/4-0/#!...n-cfg-renderer
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member Edd's Avatar
    Join Date
    Jan 2012
    Posts
    31
    Vote Rating
    0
      0  

    Default

    Thanks mitchell, I tried with store.removeAll() that clears my grid, but just for one second, then the loading message and then data is loaded again :S I don't know why this happens. :S

  4. #4
    Sencha Premium Member Edd's Avatar
    Join Date
    Jan 2012
    Posts
    31
    Vote Rating
    0
      0  

    Default

    My mistake, removeAll() works just fine, it was the onSelectionChange in other grid that caused this problem, thanks (:

Tags for this Thread

Posting Permissions

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