<div dir=rtl>
<html dir=rtl>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ActiveWidgets Grid :: Examples</title>
<style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>
<!-- ActiveWidgets stylesheet and scripts -->
<link href="../../runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="../../runtime/lib/grid.js"></script>
<!-- grid format -->
<style>
.active-controls-grid {height: 100%; font: menu;}
.active-column-0 {width: 80px;}
.active-column-1 {width: 200px; text-align: right; direction:rtl;}
.active-column-2 {text-align: right;}
.active-column-3 {text-align: right;}
.active-column-4 {text-align: right;}
.active-grid-column {border-right: 1px solid threedlightshadow;}
.active-grid-row {border-bottom: 1px solid threedlightshadow;}
</style>
<!-- grid data -->
<script>
var myData = [
["MSFT","دود ما را خواهد برد", "314,571.156", "32,187.000", "55000"],
["ORCL", "موتور ملي بر روي ۱۴ خودرو به‌طور آزمايشي نصب شد", "62,615.266", "9,519.000", "40650"],
["SAP", "اساسنامه شركت ملي نفت امسال به مجلس ارايه مي‌شود", "40,986.328", "8,296.420", "28961"],
["CA", "راه چاره حمل و نقل عمومي است", "15,606.335", "3,164.000", "16000"]
];
var myColumns = [
"Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"
];
</script>
</head>
<body>
<script>
// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;
// set number of rows/columns
obj.setRowProperty("count", 4);
obj.setColumnProperty("count", 5);
// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});
// set headers width/height
obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");
// set click action handler
obj.setAction("click", function(src){window.status = src.getItemProperty("text")});
// write grid html to the page
document.write(obj);
</script>
</body>
</html>
This topic is archived.