How to put a radio on grid ?
Hi all,
I will show a radio button on the first column in grid, I use 2.0.1 on IE7 and this is my code, What is wrong ?, Radio buttons show in the grid but the first radio is selected and I can't select another one...
grid2 = new AW.Grid.Extended;
data = [["","cell11","cell12","cell13"],["","cell21","cell22","cell23"]];
grid2.setId("grid2");
grid2.setCellText(data);
grid2.setCellTemplate(new AW.Templates.Radio, 0);
grid2.setHeaderText(["","Col1","Col2","Col3","Col4"]);
grid2.setSelectorVisible(true);
grid2.setSelectorText(function(i){return this.getRowPosition(i)+1});
grid2.setSelectorWidth(28);
grid2.setHeaderHeight(20);
grid2.setSelectionMode("single-row");
grid2.setColumnCount(5);
grid2.setRowCount(data.length);
grid2.setVirtualMode(false);
grid2.setAttribute("tabIndex", "1");
grid2.setAttribute("hidefocus", "false");
grid2.setSelectedRows([0]);
grid2.setColumnWidth(25,0);
grid2.setColumnWidth(200,1);
grid2.setColumnWidth(120,2);
grid2.setColumnWidth(150,3);
grid2.setColumnWidth(90,4);
grid2.refresh();
I will show a radio button on the first column in grid, I use 2.0.1 on IE7 and this is my code, What is wrong ?, Radio buttons show in the grid but the first radio is selected and I can't select another one...
grid2 = new AW.Grid.Extended;
data = [["","cell11","cell12","cell13"],["","cell21","cell22","cell23"]];
grid2.setId("grid2");
grid2.setCellText(data);
grid2.setCellTemplate(new AW.Templates.Radio, 0);
grid2.setHeaderText(["","Col1","Col2","Col3","Col4"]);
grid2.setSelectorVisible(true);
grid2.setSelectorText(function(i){return this.getRowPosition(i)+1});
grid2.setSelectorWidth(28);
grid2.setHeaderHeight(20);
grid2.setSelectionMode("single-row");
grid2.setColumnCount(5);
grid2.setRowCount(data.length);
grid2.setVirtualMode(false);
grid2.setAttribute("tabIndex", "1");
grid2.setAttribute("hidefocus", "false");
grid2.setSelectedRows([0]);
grid2.setColumnWidth(25,0);
grid2.setColumnWidth(200,1);
grid2.setColumnWidth(120,2);
grid2.setColumnWidth(150,3);
grid2.setColumnWidth(90,4);
grid2.refresh();
Golfito
June 27,