Skip to content

Support TreeList incell editing with drag and drop #4673

@Alex-Bubblemaster

Description

@Alex-Bubblemaster

Enhancement

Ticket 1349649

Reproduction of the problem

editable: { 
   move:true,
   mode: "incell"
}

Edit a cell and click to another cell. The changed value will be lost.

https://dojo.telerik.com/@bubblemaster/iFAFIVix

Current behavior

The draggable functionality prevents the mousedown event. As a result, the change event of the editor input does not fire, which in turn prevents the MVVM from saving the updated value.

Expected/desired behavior

It would be great to have the ability to use both of these features together. Perhaps by wiring a drag event handler internally and dealing with any changes before dragging.

Workaround

Add an event handler to the cellClose event and trigger change programmatically to any inputs with the data-bind attribute as well as to any widgets:

            cellClose: function(e) {
              var input = e.container.find("input[data-bind*='value']");
              input.trigger("change");
              var numeric = input.data("kendoNumericTextBox");
              if(numeric){
                numeric.trigger("change");
              }
            }

Environment

  • Kendo UI version: 2018.3.1017

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions