:: Forum >>

Focus lost when setting AW.UI.Input as cell template

If I set a AW.UI.Input as Cell template in a Grid with :

obj.setCellTemplate(new AW.UI.Input, 1, 1);

The input shows OK, but each character typed in causes a focus lost and the user has to click the input field with mouse again. Also, tab index dose not work in this case.

Tuesday, December 6, 2005
me too
Sunday, March 12, 2006
var lastcol="";
var lastrow="";
var MyInput = new AW.UI.Input;
var defaultcelltemplate = obj.getCellTemplate(0,0);

obj.onCellClicked = function(event, col, row){

obj.setCellTemplate(defaultcelltemplate, lastcol, lastrow);
obj.getCellTemplate(lastcol, lastrow).refresh();
obj.setCellTemplate(MyInput , col, row);
obj.getCellTemplate(col, row).refresh();

var celltext = MyInput.element().getElementsByTagName("input")[0];
if (celltext.createTextRange) {
var r = celltext.createTextRange();
r.moveStart('character', celltext.value.length);
lastcol = col;
lastrow = row;

// write grid html to the page
Sunday, March 12, 2006
up is my code.
I want to edit cell on click,not on dbclick.
but,I get this error.
Who can help me?!
Sunday, March 12, 2006

This topic is archived.

Back to support forum

Forum search