14 Mar 2012 8:52 PM #1
How to clear gridpanel/records???
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).
Any suggestions? Thanks in advance.
15 Mar 2012 6:24 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
15 Mar 2012 8:14 AM #3
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
15 Mar 2012 8:41 AM #4
My mistake, removeAll() works just fine, it was the onSelectionChange in other grid that caused this problem, thanks (: