scroll current/selected row on top
Hi all
I want set the current and selected row and then to scroll this one to the top of grid. Can someone tell me what is wrong with this code?
<script>
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setCellData(function(col, row){return "cell " + col + "." + row});
grid.setColumnCount(5);
grid.setRowCount(20);
grid.setSelectionMode("single-row"); // set selection mode to single row
grid.setCurrentRow(14);
grid.setSelectedRows([14]);
grid.refresh();
alert( "grid.getCurrentRow(): " + grid.getCurrentRow());
alert( "grid.setSelectedRows([0]): " + grid.getSelectedRows([0]));
document.write(grid);
</script>
Thanks,
Adrian
I want set the current and selected row and then to scroll this one to the top of grid. Can someone tell me what is wrong with this code?
<script>
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setCellData(function(col, row){return "cell " + col + "." + row});
grid.setColumnCount(5);
grid.setRowCount(20);
grid.setSelectionMode("single-row"); // set selection mode to single row
grid.setCurrentRow(14);
grid.setSelectedRows([14]);
grid.refresh();
alert( "grid.getCurrentRow(): " + grid.getCurrentRow());
alert( "grid.setSelectedRows([0]): " + grid.getSelectedRows([0]));
document.write(grid);
</script>
Thanks,
Adrian
Adrian
April 1,