DataView loadingText not displaying
Here's my issue. I have configured a DataView with some loadingText='it is loading...', the dataview's store is a JsonStore. the JsonStore gets loaded with data via the loadData() method. Everything works great except the loadingText is never displayed.
what am i missing?
thanks in advanced.
var ascDesc = 'ASC';
var store = new Ext.data.JsonStore({
root: '',
fields: ['Id', 'DisplayName', 'DateUpdated'
, 'Product', 'ProductGroup', 'FileId', { name: 'SizeBytes', type: 'int' }
, { name: 'AssetTypeId', type: 'int' }, 'FileSize', 'FileExtension'
]
});
PageMethods.GetAssets("", "", "", get_AssetsComplete);
var tpl = new Ext.XTemplate(
'
'',
'
i retrieve data from a ASP.NET pagemethod. I guess it makes sense that i'm passing the rawdata once it has already been downloaded, and such that there is no triggering of any other events.
is there a way to either fire off the display of the loadingText programatically or even fire the onbeforeload event which i assume would fire the loadingText??
thanks for the quick reply!!
var ascDesc = 'ASC';
var store = new Ext.data.JsonStore({
root: '',
fields: ['Id', 'DisplayName', 'DateUpdated'
, 'Product', 'ProductGroup', 'FileId', { name: 'SizeBytes', type: 'int' }
, { name: 'AssetTypeId', type: 'int' }, 'FileSize', 'FileExtension'
]
});
PageMethods.GetAssets("", "", "", get_AssetsComplete);
var tpl = new Ext.XTemplate(
'
'',
'
1) An event is represented by a change in state in the class
2) The class knows which parameters to pass to the handler.
I'd do something like:
Ext.override(Ext.DataView,
{
showLoading: function()
{
if(this.loadingText){
this.clearSelections(false, true);
this.el.update(''+this.loadingText+'
Post your code.
Thanks much!
Thanks for your attention!
Yeah, so before you make your ajax request, you need to do something like:
myView.onBeforeLoad(); //private method
LoadingText will only work if you have the store actually load the data for you, since it will handle the ajax request.
var ascDesc = 'ASC';
var store = new Ext.data.JsonStore({
root: '',
fields: ['Id', 'DisplayName', 'DateUpdated'
, 'Product', 'ProductGroup', 'FileId', { name: 'SizeBytes', type: 'int' }
, { name: 'AssetTypeId', type: 'int' }, 'FileSize', 'FileExtension'
]
});
PageMethods.GetAssets("", "", "", get_AssetsComplete);
var tpl = new Ext.XTemplate(
'
'',
'
#If you have any other info about this subject , Please add it free.# |