-
21 Oct 2010 10:25 AM #1
How do you insert an item into a store?
How do you insert an item into a store?
store.Insert(0, {'TypeId': '', 'TypeName': 'Select Type'});
This doesn't seem to work.
-
21 Oct 2010 10:30 AM #2
The insert method takes a Model instance as the 2nd argument, which is different from the object literal that contains the data for that record.
-Shea
My Blog:VinylFox | Twitter:@VinylFox | JavaScript Magazine:JSMag | Curator of the Baltimore/DC JavaScript Meetup | Author: Learning ExtJS 3.x Book
ExtJS Extensions & Plugins: GMapPanel UX | HtmlEditor Buttons Plugin | Selection Enabler Plugin | Grid DataDrop Plugin | Additional Ext.Fx
Sencha Touch Plugins: Swipe Tabs | List Pull Refresh | Accelerometer Tabs
-
22 Oct 2010 7:26 AM #3
Here is the solution
Here is the solution
here is how i did it:
Code:var emptySelect = Ext.ModelMgr.create({ TypeId : '', TypeName : 'Select Type', }, 'Type'); typeStore.insert(0, emptySelect );
-
22 Oct 2010 12:28 PM #4
Also, if you're just trying to insert an item (object), you can use the stores add() method.
Similar Threads
-
[FIXED-239] datachanged event not fired after store.add() / store.insert() - (0.92)
By jeroenvduffelen in forum Sencha Touch 1.x: BugsReplies: 3Last Post: 3 Sep 2010, 6:28 PM -
Insert item to Grid Store and let the row fade in
By grandfatha in forum Ext GWT: DiscussionReplies: 0Last Post: 9 Oct 2009, 4:54 AM -
How to insert an item(button) between...
By Joey Kwon in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 16 Jul 2009, 5:34 PM -
Insert item comboBox
By Perfect Lion in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 11 Oct 2007, 10:21 PM


Reply With Quote
