3.2.0

How to give Dymnamic array list to grid

I am retriving one arry list from database to jsp now how to assign that array list to grid.
rajesh
October 7,
who
is doing this?
December 18,
This can be a solution:

<script>
var cellsArray = new Array();
var headers = ["Attribute"];
var objG = new AW.UI.Grid;
objG.setSize(400, 100);

<%for(int i=0; i<arrayList.size(); i++){%>
cellsArray[<%=i%>] = new Array("<%=arrayList.get(i).attribute%>");
<%}%>


objG.setCellText(cellsArray);
objG.setHeaderText(headers);

objG.setColumnCount(headers.length);
objG.setRowCount(cellsArray.length);

document.write(objG);
</script>

Hope it helps!
Julian
January 29,

This topic is archived.

See also:


Back to support forum