Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Max on Jan 14, 2009 12:07
open dhtmlx forum
Get position of caret in excell

I'm using a treegrid with a few standard editor type excells. I was wondering if there was a way to get the location of the caret inside of the text field. This is pretty easy when given an html text field, but I am unsure how to access the properties of the excell itself.


Thanks,

Max
Answer posted by Support on Jan 15, 2009 02:09
You can locate current text edit field as 

var cell = grid.editor.cell;
var input = (cell.getElementsByTagName("INPUT")[0]||cell.getElementsByTagName("TEXTAREA")[0]);