3.2.0

is this a bug?where i can report it.

i found a problem.
1. set column size
.active-column-0 {width: 80px;}
2.empty grid data
var myData = [];
3.
obj.setRowProperty("count", function(){return myData.length});

4.add row.
<input type="button" onclick='myData.push(["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"]);
obj.setSelectionIndex(myData.length-1);
obj.refresh();
obj.refresh();'>

the grid column will display wrong size.

These is All code,from example\grid\basic.html


<html>
<head>
<title>ActiveWidgets Grid :: Examples</title>


<!-- 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-grid-column {border-right: 1px solid threedlightshadow;}
.active-grid-row {border-bottom: 1px solid threedlightshadow;}
</style>

<!-- grid data -->
<script>
var myData = [
];

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", 20);
obj.setColumnProperty("count", 5);

// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setRowProperty("count", function(){return myData.length});

// 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>
<input type="button" onclick='myData.push(["MSFT","Microsoft Corporation", "314,571.156", "32,187.000", "55000"]);obj.setSelectionIndex(myData.length-1);obj.refresh();obj.refresh();'>

</body>
</html>


sxf
November 28,

This topic is archived.

See also:


Back to support forum