:: Forum >>

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>
document.write(gridObject);
gridObject.refresh();
</script>
</body>
</html>


Any one experiance the same sort of problem ?

Your Help is highly appreciated......

Thanks In Advance
Suraj T
Wednesday, August 20, 2008
This looks wrong to me -

document.write(gridObject);
gridObject.refresh();

You should use either one or another but not both.
Alex (ActiveWidgets)
Wednesday, August 20, 2008
still having the same problem.
Suraj T
Friday, August 22, 2008
Alex, any update on the above issue. I have tried the same that you said. I have removed document.write(gridObject); but still I am facing the same problem. My grid is inside an iframe and that iframe is contained in a parent iframe. Iam refreshing the parent iframe with new values set in to session. In that scenarios I am getting this sort of problem.
Suraj T
Tuesday, September 2, 2008

This topic is archived.


Back to support forum

Forum search