3.2.0

initial row selections

hi,

the code below does result in a table with highlighted first row (no selection highlight is shown at all). What am I doing wrong?


<script>
   var table = new AW.UI.Grid;
   table.setRowCount(4);
   table.setColumnCount(4);
   table.setCellText( function(i,j) {return i+j} )
   table.setSelectedRows([0]);
   document.write(table);
</script>


thanks
Dmitry
January 4,
Dmitry,

I had the same issue. For reasons I'm not sure, the the entire grid needs to be finished loading to set the first row active. I found that if I called an onLoad function from the <body> tag, it would execute after the grid was finished loading.

<script>
function highlightRow() {
     obj.setSelectedRows([0]);
}
</script>

<body onLoad=highlightRow()>
...
</body>

Sam S.
January 9,

This topic is archived.

See also:


Back to support forum