3.0 beta 2

Refresh grid

I am using the AW 2.0 grid with XML as the data source. I have an event that will update the data in the source XML file, but I don't know how to refresh the grid so that it shows the changes to the source XML file.

Rick Villela
October 14,
Chris Bogers
October 14,
I was hoping it would be that simple.
Here is a snippet of my code:
var table = new AW.XML.Table;
table.setColumns(['Title', 'Description']);
var obj = new AW.UI.Grid;
obj.setHeaderText(['Category Title', 'Description']);

As a test, I manually go and change the XML file contents after I have the page displayed.
- When I do a obj.refresh(), nothing happens
- I tried doing another table.request() and obj.refresh(), no luck
- I tried obj.setCellModel(table) again to no avail
Futhermore I even noticed that the objects are sticky. Meaning that after I leave the page or do a manual refresh of the page, the objects do not read the XML file again even though the page is being reposted.
Rick Villela
October 14,
I think I discovered what the issue is with this problem. When you run the examples from c:\inetpub\www\test.htm it works great, but when you run the examples through the Web Server (I am using IIS 6.0) http://www.mysite.com/test.htm, the web server caches the page and therefore AW does not read the XML file again. I tried using the no-cache META tag and the Response.Expires=0 ASP command to no avail. But, when I set Expired=0 in the IIS server, it refresh properly.

Does anybody have any better solutions?
Rick Villela
October 14,
Hi, I am using a csv file as a data src.
but whenever i want to refresh wht i only do is to call
function updateTable(){

It will update ur grid not the entire page thts wht u should be interested i guess.
It works fine, but there is a bug.
If you sort the grid, after that if u change the no. of rows in the src file it gives error.
October 17,
I was able to get the same results as you with Netscape and Firefox, but with IE I still have the problem where the table.request() won't re-read the xml file unless I turn off caching for the entire site.
Rick Villela
November 9,

Is there anyway you can append some random number or timestamp as a parameter to your filename? A simple JS script should be able to do this. This way your browser always looks at the request as new one.

For example, instead of:


Try to append the timestamp (MMDDYYYYHHMMSS)


Sam S.
January 19,
This should do it

var d = new Date();
January 19,
Sam S.
January 20,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.