-
22 Feb 2007 9:08 AM #1
Fire clear event when Store is empty?
Fire clear event when Store is empty?
Just a suggestion and maybe this doesn't make sense in all cases. But I think it would be useful to fire the clear event on a data store if you remove all the records.
Ie I have 3 records in my store and call remove on all 3.
I think this may clean up code like the following:
Seems to me that the clear event should signify that all records have been removed and not be so tightly bound to the removeAll function.Code:ds.on('remove', function() { if (!ds.getCount()) tbDeleteFindingBtn.disable(); });
-
22 Feb 2007 4:39 PM #2
The clear event is specifically for when you clear the data store (to avoid numerous delete events). Firing the event delete + clear, would kind of defeat the purpose -> causing 2 grid, view (or other component) renders.
Similar Threads
-
clear grid totaly
By emi in forum Ext 1.x: Help & DiscussionReplies: 10Last Post: 25 Apr 2012, 10:28 AM -
Clear grid's sort arrow icon
By SLerman in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 5 Oct 2011, 5:49 AM -
Ext.util.Event.fire()
By papasi in forum Ext 1.x: BugsReplies: 2Last Post: 9 Mar 2007, 11:57 PM -
struggle on event fire
By qiuyl in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 9 Dec 2006, 3:25 PM -
fire onclick but not ondrag
By Slapyo in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 29 Nov 2006, 11:11 PM


Reply With Quote