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

Problem with using CellEdit on next cell

2 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 Oct 2012, 03:31 PM
Hi!
I use a grid with incell edit option. I try to set focus and edit the next cell with tab key pressed on prev.

$('#grid div table tr td input').live('keydown', function(event) {
        if (event.which == 9) {
            var grid = $("#grid").data("kendoGrid");
            var $td = $(this).parent();
            grid.editCell($td.next());
        }
    });
something like this.
But in this case old input is not closed. 
I try new code
$('#grid div table tr td input').live('keydown', function(event) {
        if (event.which == 9) {
            var grid = $("#grid").data("kendoGrid");
            var $td = $(this).parent();
    grid.closeCell();
            grid.editCell($td.next());
        }
    });
In this case old input closes, but entered value doesn't saved in a cell.
How can I edit next cell with correct close previous input?

2 Answers, 1 is accepted

Sort by
0
Accepted
Nohinn
Top achievements
Rank 1
answered on 04 Oct 2012, 03:36 PM
The grid has a navigatable property that does what you're looking for.
$('#grid').kendoGrid({
navigatable: true,
...
});
0
Alex
Top achievements
Rank 1
answered on 04 Oct 2012, 03:43 PM
tnx
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Nohinn
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Share this question
or