3.2.0

AW.UI.Grid is not displaying rows inside Grid after refreshing the page

Hi, I am facing the problem with AW Grid 2.0. Some times Grid is not displaying rows. When I take the view source, I am able to see the values are assigned correctly to the JavaScript Array, assigning it to the GRID and finally refreshing the GRID. When I manually refresh the page(right click on page and give refresh), Grid is showing all the rows correctly.

Scenario is - Grid is showing a set of rows and while clicking on a particular row, its sending a request to the server and after getting the response the parent page in which GRID resides is reloading. After reloading Grid is not displaying any of the rows even though I am able to see all the statements needed for loading data in View Source. I right clicked on the page and give a refresh, It show the data correctly in the Grid.

Code
<html>
<head>
<script>
var dataArray = new Array();

................................................................
................................................................
.......Java Scriptlet statements for getting data
................................................................
................................................................

var gridObject = new AW.UI.Grid;
gridObject.setId("grid1");
gridObject.clearScrollModel();
gridObject.clearSelectedModel();
gridObject.clearSortModel();
gridObject.clearRowModel();
gridObject.setCellText(dataArray); gridObject.getCellTemplate().setStyle("color", "black"); gridObject.setColumnCount(7);
gridObject.setRowCount(10);
gridObject.setSelectorVisible(true);
gridObject.setSelectorText(function(i){return this.getRowPosition(i)+1});
gridObject.setSelectionMode("single-cell");
</script>
<body>
<script>
gridObject.refresh();
</script>
</body>
</html>


Any one experiance the same sort of problem ?

Your Help is highly appreciated......

Thanks In Advance
Habib K M
September 19,
I would suggest removing the following lines (not needed in a new grid) -

gridObject.clearScrollModel();
gridObject.clearSelectedModel();
gridObject.clearSortModel();
gridObject.clearRowModel();

Can you compare if the page and the content of the dataArray are the same before and after refresh (saving page source)?
Alex (ActiveWidgets)
September 23,
Alex;

I had the same problem under FireFox 3.0. The data did change when I reloaded the page (first pass had 250 rows, 2nd pass had 2 rows). The grid displays as blank. I solved my problem by moving to an AJAX call using CSV data. I can post a sample if you would like to check it out.
Richard Noble
September 24,
Alex;

Any suggestion on this? I'm having to rewrite to use CSV via AJAX to work around this to get FF3 to reload the grid after a search. If that is the perfered method then that fine I just would like a clarification on this.

Thanks for all you help.
Richard Noble
September 29,

This topic is archived.

See also:


Back to support forum