:: Forum >>

Select the input text in grid

Hi, how re u guys?

I have a problem, i did a search but can't find anthying to help.

When my cell receive the focus (with input template for edit), i wanna select the text, i already tried:

grid.getCellTemplate(col,row).element().select();
// doenst work because cell template is span
// i cant find the input template
grid.getCellTemplate(col, row).getContent("box/text").select( );
// doenst work, error in javascript parameter for "box/text" ?


Any idea guys?
Tkz.
Pc (from Brazil)
Tuesday, January 30, 2007
help?!
Pc (from Brazil)
Thursday, February 1, 2007
Something like -

IE:

var e = grid.getCellTemplate(col, row).getContent("box/text").element();
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();

FF:

var e = grid.getCellTemplate(col, row).getContent("box/text").element();
e.select();
Alex (ActiveWidgets)
Thursday, February 1, 2007
yeah!!! finally!!!

Tkz a lot Alex.
go AW =)
Pc (from Brazil)
Thursday, February 1, 2007

This topic is archived.


Back to support forum

Forum search