Search code examples
javascriptkendo-uitelerikkendo-grid

Kendo grid drag and drop not working with less number of records


I have integrated kendo grid in my project with drag and drop functionality. I have issue that when there are no records in one grid then the drop functionality is not working as expected. I have to drop the record to one of the record available to work. I have created a sample for the functionality: Kendo grid sample

Also, here is the screen shot for the issue: enter image description here


Solution

  • This is because you are specifying that the kendoDropTarget is on the grid table attribute (which would be specifically the content of the grid).

    grid1.table.kendoDropTarget({...
    

    Change this to use the grid wrapper attribute, which encapsulates the entire grid control.

    grid1.wrapper.kendoDropTarget({
    

    Here is a Dojo example to demonstrate the above.