:: Forum >> General/Off-topic >>

i am unable to display grid pls tell me the error


<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="/ActiveWidgets/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" >
<script src="/ActiveWidgets/runtime/lib/grid.js"></script>
<script src="/ActiveWidgets/patches/paging1.js"></script>
<style type="text/css">
<!--
.active-controls-grid {height:80%; width:100%; font:Arial, Helvetica, sans-serif; background:background-color:#FFFFFF;}
.active-column-0 {width:40pt; text-align:center; background-color:#FFFFCC;}
.active-column-1 {width: 110pt; background-color:#CCFFFF;}
.active-column-2 {width: 60pt; text-align:center; background-color:#FFFFCC;}
.active-column-3 {width: 100pt; text-align:center; background-color:#CCFFFF;}
.active-column-4 {width: 100pt;}
.active-grid-column {border-right: 1px solid black;}
.active-grid-row {border-bottom: 1px solid black;}
.active-templates-header{font-weight:bold; color:green; text-align:center;}
-->
</style>
</head>

<body>

<script>
var myTitle=["Column 1", "Column 2", "Column 3", "Column 4", "Column 5"];
var myData=[
["jitesh","jitesh","null","null","null"]
,["raghu","raghu","null","null","null"]
,["rajesh","rajesh","null","null","null"]
,["ramu","ramu","null","null","null"]
,["tharik","tharik","null","null","null"]
];


var obj = new Active.Controls.Grid;
var row = new Active.Templates.Row; //add double click event
row.setEvent("ondblclick", function(){this.action("myAction")});
obj.setTemplate("row", row);
obj.setModel("row", new Active.Rows.Page);
obj.setColumnHeaderHeight(25);
obj.setProperty("row/count", myData.length-1);//(myData.length-1) is total rows
obj.setProperty("column/count", 5);
obj.setProperty("data/text", function(i, j){return myData[i][j]});
obj.setProperty("column/texts", myTitle);
obj.setProperty("row/pageSize", 25);

document.write(obj);
</script>
</body>
</html>
Wednesday, November 2, 2011



This topic is archived.

Back to support forum

Forum search