combobox in grid when starting editing
I am trying to do something like this (in a grid): changing the cell template to a combo when I start editing. To do that I save the current template, change it and restore it - it works fine once, the grid is not editable anymore. Any hint?
Thanks in advance
obj.onCellEditStarted = function(text, col, row){
cbj.evosTemplate= this.getCellTemplate(col,row);
cbj.evosRow= row;
cbj.evosCol= col;
cbj.evosGrid= this;
this.setCellTemplate(cbj,col,row);
this.refresh();
}
where cbj is defined like this:
var cbj = new AW.UI.Combo();
cbj.setId("myCombo");
cbj.setControlText("été");
cbj.setItemText(["Home", "été", "Font size", "Search"]);
cbj.setItemCount(4);
cbj.onItemClicked= function(event,index) {
if (this.evosTemplate) {
var selectedText = this.getItemText(index);
this.evosGrid.setCellTemplate(this.evosTemplate,this.evosCol,this.evosRow);
this.evosGrid.setCellText(selectedText, this.evosCol,this.evosRow);
this.evosGrid.refresh();
}
};
Thanks in advance
obj.onCellEditStarted = function(text, col, row){
cbj.evosTemplate= this.getCellTemplate(col,row);
cbj.evosRow= row;
cbj.evosCol= col;
cbj.evosGrid= this;
this.setCellTemplate(cbj,col,row);
this.refresh();
}
where cbj is defined like this:
var cbj = new AW.UI.Combo();
cbj.setId("myCombo");
cbj.setControlText("été");
cbj.setItemText(["Home", "été", "Font size", "Search"]);
cbj.setItemCount(4);
cbj.onItemClicked= function(event,index) {
if (this.evosTemplate) {
var selectedText = this.getItemText(index);
this.evosGrid.setCellTemplate(this.evosTemplate,this.evosCol,this.evosRow);
this.evosGrid.setCellText(selectedText, this.evosCol,this.evosRow);
this.evosGrid.refresh();
}
};
Philippe
March 20,