Kendo Grid Not Saving Values After Moving to the next cell

后端 未结 1 1606
Happy的楠姐
Happy的楠姐 2021-01-25 06:42

I have tried to modify the behavior of the InCell Edit Mode of kendo Grid. I mean i tried to navigate to cells using arrows but i have a problem in doing So.

This is my c

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-25 06:57

    Before you set focus on the next cell, you need to call _handleEditing. You also don't need to click in the grid and remove classes; all you need is this (example for right arrow):

    var code = e.keyCode || e.which,
        grid = $("#grid").data("kendoGrid"),
        current = grid.editable.element,
        next = $(current).nextAll("td").eq(0),
        container = $(e.target).closest("[role=gridcell]"),
        length;
    
    if (code === 39) {
        length = $(current).nextAll("td").length;
        if (length > 1) {
    
            if (!container[0]) {
                container = current;
            }
    
            grid._handleEditing(container, next, e.currentTarget);
        }
    }
    

    0 讨论(0)
提交回复
热议问题