Checkbox In grid not changing value
Hi,
I added a checkbox to my grid, and it seems it that once it checked, it cannot be unchecked. The value is always false ?
here is my code :
var checkbox = new AW.UI.Checkbox;
checkbox.onControlValueChanged = function(value){
if (value == true){document.frmMandat.ToDo.value = 'AddPermission';}
if (value == false) {document.frmMandat.ToDo.value = 'DeletePermission';}
alert(value);
alert(document.frmMandat.ToDo.value);
}
var myHeaders = ["Permission", "Nom", "Prénom", "Client"];
var myCells = <%=GridStr%>
var PemissionGrid = new AW.UI.Grid;
PemissionGrid.setCellText(myCells);
PemissionGrid.setColumnCount(4);
PemissionGrid.setRowCount(<%=i%>);
PemissionGrid.setCellTemplate(checkbox, 0)
PemissionGrid.setHeaderText(myHeaders);
PemissionGrid.setControlSize(690, 165);
PemissionGrid.setControlPosition(40, 295);
PemissionGrid.setSelectionMode("single-row");
document.write(PemissionGrid);
Tkx !
I added a checkbox to my grid, and it seems it that once it checked, it cannot be unchecked. The value is always false ?
here is my code :
var checkbox = new AW.UI.Checkbox;
checkbox.onControlValueChanged = function(value){
if (value == true){document.frmMandat.ToDo.value = 'AddPermission';}
if (value == false) {document.frmMandat.ToDo.value = 'DeletePermission';}
alert(value);
alert(document.frmMandat.ToDo.value);
}
var myHeaders = ["Permission", "Nom", "Prénom", "Client"];
var myCells = <%=GridStr%>
var PemissionGrid = new AW.UI.Grid;
PemissionGrid.setCellText(myCells);
PemissionGrid.setColumnCount(4);
PemissionGrid.setRowCount(<%=i%>);
PemissionGrid.setCellTemplate(checkbox, 0)
PemissionGrid.setHeaderText(myHeaders);
PemissionGrid.setControlSize(690, 165);
PemissionGrid.setControlPosition(40, 295);
PemissionGrid.setSelectionMode("single-row");
document.write(PemissionGrid);
Tkx !
David
July 31,