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
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,