:: Forum >>

How to set focus to the one grid cell that is Textarea template?

Alex:

I set a Textarea template to one column of the grid. how I can set focus to the Textarea cell?


// template
.......
/*************/

My.Templates.In_Textarea = Active.Templates.Text.subclass();

My.Templates.In_Textarea.create = function()
{
var obj = this.prototype;
obj.setTag("textarea");
obj.setClass("templates", "textarea");
obj.setEvent( "onmouseup",null);
obj.setEvent( "onblur", function(event, src) { this.action("test"); } );

};

My.Templates.In_Textarea.create();
/*************/
.......


// grid

obj.setAction("test", function(src){
alert(obj.getProperty("data/text", [17], [0]));
alert(obj.getProperty("data/text", [17], [2]));
obj.element().focus();
});

shinner
Wednesday, July 6, 2005

This topic is archived.


Back to support forum

Forum search