Checkboxes in grid
Ok, here is a tricky one :
I understood the checkbox, and according to be, should be the same within the grid... So I made a small example :
I can't understand why I never catch the event, so as to be able to take over, like change the value of myData array...
Shouldn't the checkbox change automatically the value of the myData[i][j] of the corresponding cell?
Furthermore, when do we use UI or Templates in the grid?
Any light of this is usefull!
I understood the checkbox, and according to be, should be the same within the grid... So I made a small example :
<script>
var checkbox = new AW.UI.Checkbox;
checkbox.setControlText("Checkbox");
checkbox.onControlValueChanged = function(value){
alert("this one works fine");
}
document.write(checkbox);
var obj = new AW.UI.Grid;
/////////////////////////////////////////
var c0 = new AW.UI.Checkbox; //OR AW.Templates.Checkbox;
c0.onControlValueChanged = function(value){
alert("here")
}
c0.onItemClicked = function(event, i){
alert("here too")
}
c0.onControlStateChanged = function(value){
alert("here also")
}
obj.setCellTemplate(c0, 0);
/////////////////////////////////////////
obj.setColumnCount(1);
obj.setRowCount(1);
document.write(obj);
</script>
I can't understand why I never catch the event, so as to be able to take over, like change the value of myData array...
Shouldn't the checkbox change automatically the value of the myData[i][j] of the corresponding cell?
Furthermore, when do we use UI or Templates in the grid?
Any light of this is usefull!
Michel
November 26,