Disable a Checkbox
I have a Checkbox in my grid that displays the value from a Recordset.
I want to diable this button so the user can not change it from the grid, but instead double click on the the row to open up a new page that displays more data for the record that is needing to be changed.
My question is how do I disable the checkbox in the grid after i have populated it?
CODE:
// create grid control & checkbox
var obj = new AW.UI.Grid;
obj.setId("myGrid");
obj.setSelectorVisible(true);
obj.setSelectionMode("single-row");
obj.setVirtualMode(true);
obj.setCellText(myCells);
obj.setHeaderText(myHeaders);
function image(col, row){
if (this.getCellText(2, row) == "0") {
return false;
}
else {
return true;
}
}
obj.setCellTemplate(new AW.Templates.Checkbox, 2);
obj.setCellValue(image, 2);
// Disables the text
// obj.setAttribute('disabled', true);
// set number of columns/rows
obj.setColumnCount(myHeaders.length);
obj.setRowCount(myCells.length);
obj.setColumnWidth(0, 0);
obj.setFixedLeft(1);
obj.onRowDoubleClicked = function(event, index){ window.location = "containers_edit.asp?SPILL_ID=" + obj.getCellValue(0,index) + "&zone_name=<%=request.querystring("zone_name")%>&template_type=<%=request.querystring("template_type")%>&rowid=" + index};
// write grid to the page
<%if request.querystring("rowid") <> "" then%>
var therow = <%=request.querystring("rowid")%>
obj.setSelectedRows([therow]);
obj.setCurrentRow(therow);
<%end if%>
document.write(obj);
I want to diable this button so the user can not change it from the grid, but instead double click on the the row to open up a new page that displays more data for the record that is needing to be changed.
My question is how do I disable the checkbox in the grid after i have populated it?
CODE:
// create grid control & checkbox
var obj = new AW.UI.Grid;
obj.setId("myGrid");
obj.setSelectorVisible(true);
obj.setSelectionMode("single-row");
obj.setVirtualMode(true);
obj.setCellText(myCells);
obj.setHeaderText(myHeaders);
function image(col, row){
if (this.getCellText(2, row) == "0") {
return false;
}
else {
return true;
}
}
obj.setCellTemplate(new AW.Templates.Checkbox, 2);
obj.setCellValue(image, 2);
// Disables the text
// obj.setAttribute('disabled', true);
// set number of columns/rows
obj.setColumnCount(myHeaders.length);
obj.setRowCount(myCells.length);
obj.setColumnWidth(0, 0);
obj.setFixedLeft(1);
obj.onRowDoubleClicked = function(event, index){ window.location = "containers_edit.asp?SPILL_ID=" + obj.getCellValue(0,index) + "&zone_name=<%=request.querystring("zone_name")%>&template_type=<%=request.querystring("template_type")%>&rowid=" + index};
// write grid to the page
<%if request.querystring("rowid") <> "" then%>
var therow = <%=request.querystring("rowid")%>
obj.setSelectedRows([therow]);
obj.setCurrentRow(therow);
<%end if%>
document.write(obj);
Christy
December 22,