3.2.0

Can I put it inside a table

Can I put it inside a table
February 6,
Yes you can
Rob Francis
February 6,
yep

<table>
<tr><td>other stuff</td></tr>
....
<tr><td id='insertAWGRIDhere'></td></tr>
</table>

<script>
var obj = new AW.UI.Grid;
obj .setId("myGrid");
obj .setSize(600, 250);
obj .setCellText(function(i, j){return j + "-" + i});
obj .setHeaderText("header");
obj .setColumnCount(3);
obj .setRowCount(3);
obj .setCellEditable(true);
document.getElementById("insertAWGRIDhere").innerHTML=obj.toString();
February 6,
Could some one please post a complete example as above?
Where do you write it out?
How does "inserAWGridhere" relate to "myGrid" IN ABOVE above...

very confusing demo??
ideas?
February 21,
You just have to have the javascript that writes out the grid to appear where you need it within your html

<html><head>  
    <script src="runtime/lib/aw.js"></script>  
    <link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>  
</head> <body>  

<script>  

    var myData = [  
        ["aa","USPS ","0","9"],  
        ["bb","Email","1","9"],  
        ["cc","FedEX","2","9"],  
        ["cc","FedEX","2","9"],  
        ["dd","Phone","1","9"] 
    ];  
   
    var obj = new AW.UI.Grid; 

    obj.setCellText(myData);  

    obj.setColumnCount(3);  
    obj.setRowCount(5);  

</script> 

Here is some text on a page 

<table border=10 cellpadding=10 cellspacing=10>
<tr><td>Add a grid to this column using line below<br>

<script>
    document.write(obj); 
</script>

</td></tr></table>

</body>  
</html>
Rob Francis
February 21,
Please note, if you are trying to use Firefox using a grid within tables, sometimes your grid will not play nicely with % widths or heights inside your tables. It's basically a Firefox issue. 1.5 seems to have addressed some of these problems.
Tony
February 21,

This topic is archived.

See also:


Back to support forum