Switching Status Text on and off.
I am trying to setup a grid that when first created and then displayed on the page, it does not load any data nor does it display the status message. However, once another grid is properly populated the grid would be populated with data and the status message would appear to display the loading message. Well, I've got the data population working correctly, but I can not seem to get the status message to work. When the grid is initially created, I have it such that the message is not displaying, but then I can't get it to go "back on" when the grid finally is retrieving its data. Here is the code.
When I first generate the grid, I shut off the status message.
Then, when I am ready to retrieve the data, right before doing the request, I run the following code:
If I run the second code section on a grid that does not have the first code section, it runs correctly. If I run it on a grid that I applied the first code section to, the second section does not seem to work. I am not clear on the difference between the code and text properties, so I am sure that is where the problem lies, but I can't figure out how to get it to work correctly.
Any help is appreciated.
When I first generate the grid, I shut off the status message.
obj.setStatusProperty("code", "");
Then, when I am ready to retrieve the data, right before doing the request, I run the following code:
obj.setStatusProperty('text', function(){switch(this.getStatusProperty('code')){case 'loading': return grid_loadingmessage; case 'nodata': return grid_nodatamessage; default: return '';}});
If I run the second code section on a grid that does not have the first code section, it runs correctly. If I run it on a grid that I applied the first code section to, the second section does not seem to work. I am not clear on the difference between the code and text properties, so I am sure that is where the problem lies, but I can't figure out how to get it to work correctly.
Any help is appreciated.
Alex
January 28,