Threaded View
-
24 Aug 2011 11:17 PM #1
Answered: Modify contents in a List - How do we refresh a list after modifying the store?
Answered: Modify contents in a List - How do we refresh a list after modifying the store?
Hi,
I am using a Sencha List as shown below:
Ext.regModel ('List1', {idProperty: 'id',
fields: [ { name: 'id', type: 'int' }, { name: 'title', type: 'string' }, ], });
Ext.regStore('List1Store', { model:'List1', });
MyApp.views.List1List = new Ext.List ({
id: 'idList1', store: 'List1Store',
itemTpl: '<div class="list-item-title" > <input type = "checkbox" id = "{id}" > {title} {narrative}</div>',
});
I am adding this list to a Panel and displaying it. My requirement is to add, delete and update items in this list. Adding and deleting (by List.getStore.add(), and List.getStore.remove() ) is working without any issues. But, we are not successful yet on updatign an existing content in the list. What is the best way to do this?
How do I retrieve items from store, update a record in the store, and refresh the list with the updated item?
we tried repaint() and load(), but it didnt work :-(
please help....
}
-
Best Answer Posted by raz0r1
normally you would use
after changing something.Code:grid.getView().refresh();


Reply With Quote