View Full Version : dataview real time update

17 Feb 2010, 9:21 PM
right now, i have this function which updates my dataview. this is called by the server side through invoke script and the "data" to be loaded to the store is passed. this gets called for each dataview item to be loaded to simulate "real-time" update

the problem is each item i do this, i am passing the whole store data and reloading it to the store, which makes the system slow if there are many dataview items... how can i make it so that i will only pass data to be appended/inserted to the dataview? and also how can i make it such that the selected item in the dataview doesn't get deselected while the dataview is being updated

var reloadFileListWithData = function(data, resetscroll)
var store = Ext.getCmp('extdvfilelist').getStore();
var filelist = data;
if (filelist == "")
filelist = Ext.decode(filelist);
if (resetscroll != null && (resetscroll || resetscroll == 'true'))
Ext.getCmp('extdvfilelist').getEl().scrollTo('top', 0);