set selected row before page loads
Hi,
I found no way to pre-selcet a certain row in the table when the page loads.
prior to version 2 the following code used to do that:
obj.setSelectionProperty("index","1");
I am using a single-row selection model and obj.setSelectedRows([2]) makes the first row disappear altogether.
My full code which does not work is as follows:
var myData = [["a","b","c",],["a","b","c",],["a","b","c",],];
var myColumns = ["s","s","s",];
var obj = new AW.UI.Grid;
obj.setId("tabulated_data1");
obj.setRowCount(3);
obj.setColumnCount(3);
obj.setCellText(myData);
obj.setHeaderText(myColumns);
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectionMode("single-row");
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);
obj.setSelectedRows([1]);
document.write(obj);
Thanks for your help
I found no way to pre-selcet a certain row in the table when the page loads.
prior to version 2 the following code used to do that:
obj.setSelectionProperty("index","1");
I am using a single-row selection model and obj.setSelectedRows([2]) makes the first row disappear altogether.
My full code which does not work is as follows:
var myData = [["a","b","c",],["a","b","c",],["a","b","c",],];
var myColumns = ["s","s","s",];
var obj = new AW.UI.Grid;
obj.setId("tabulated_data1");
obj.setRowCount(3);
obj.setColumnCount(3);
obj.setCellText(myData);
obj.setHeaderText(myColumns);
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectionMode("single-row");
obj.setSelectorWidth(28);
obj.setHeaderHeight(20);
obj.setSelectedRows([1]);
document.write(obj);
Thanks for your help
Adi
July 28,