TreeView Inline Editor Help

2 posts, 0 answers
  1. Jamie
    Jamie avatar
    6 posts
    Member since:
    Feb 2015

    Posted 24 Jun 2015 Link to this post

    I understand that inline editing is not something that is supported by the TreeView and I've seen other solutions in the forums where people created work-arounds for this.  I'm trying to work on my own work-around to create actual inline editing using the tree view but I'm having issues I'm hoping someone can help with.

     Essentially I've created a template that wraps the data in a span tag, then on the double click event of that span i replace the html contents of the data with code for a text box.  My intent is that I then use the blur event of the text box to save the data into the treeview data and get rid of the textbox.

    The problem I'm having though is that when the text box is created, I can't actually click into it.  I'm wondering if one of the events of the TreeView is hijacking the click event and redirecting focus elsewhere which essentially never lets the textbox get focus.  Anyone (especially the Telerik devs) have any ideas why this could be happening?

  2. Jamie
    Jamie avatar
    6 posts
    Member since:
    Feb 2015

    Posted 24 Jun 2015 in reply to Jamie Link to this post

    I guess I just needed a little more elbow grease.  For anyone else trying to do this, the issue is indeed with the the focus being stolen.  Seems as though the treeview node takes focus when you click on anything in the node (including the textbox i embeded).  I was able to work around this by doing .focus().select() to manually assign focus and select the textbox contents.  Since I'm saving the data on the blur anyway i dont need to handle future clicks but for testing i did confirm that you could also manually call the focus in the tree views select event to handle that.
  3. Kendo UI is VS 2017 Ready
Back to Top