This is a migrated thread and some comments may be shown as answers.

Attach Client Event Handler to Autogenerated Edit Box

1 Answer 31 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Marbry
Top achievements
Rank 1
Marbry asked on 26 Oct 2011, 02:13 PM
How would I attach a client event handler to the text box that gets autogenerated when you call startEdit() on a node?

I tried using the OnClientKeyPressing() event on the tree, but apparently it doesn't bubble up from the text box.

1 Answer, 1 is accepted

Sort by
0
Marbry
Top achievements
Rank 1
answered on 26 Oct 2011, 04:06 PM
I figured it out, I was able to get a reference to the edit box with node.get_inputElement() elsewhere, retrieve the values I needed and dump that into a couple of variables.

That way I could attach the handlers there without params, and I didn't need to reference the node directly to get those values within the handler functions.  And I could get a reference of course to the edit box within the handlers as window.event.srcElement.
Tags
TreeView
Asked by
Marbry
Top achievements
Rank 1
Answers by
Marbry
Top achievements
Rank 1
Share this question
or