In the Grid I'm looking for a way to do a batch edit for all the fields in 1 column (the only editable field). I've turned on Batch Edit, In Cell Editing, and Navigateable for keyboard Navigation.
Since this is a 10 key function for the most part, ideally I would like tab go to the next editable cell, which is the next row. (As designed, tab goes to next cell - regardless of being editable) In other applications, tab goes to the next editable cell. If all cells editable showed as a textbox in Batch Edit, that would be an option as well.
I've tried to capture the current cell, then after saving set the cell below to be editable. But the grid synchronization isn't complete or grid is refreshing or something and the first cell in grid is selected.
Would be better if this could be connected to a Tab key from the cell being edited.
For the Save Event:
.Events(events =>
{
events.Save(
@<text>
function (e) {
var currentCell = $("#AreaPhysicalCountGrid_active_cell");
setTimeout(function () {
$("#AreaPhysicalCountGrid" + @ViewBag.CycleCountID).data("kendoGrid").dataSource.sync();
SelectNextEditableCell(currentCell);
});
}
</text>);
})
My function for changing to the next editable cell.
function SelectNextEditableCell(currentCell) {
var grid = $("#AreaPhysicalCountGrid").data("kendoGrid");
//var currentCell = $("#AreaPhysicalCountGrid_active_cell");
//Get index of the td (2)
var currCellIndex = currentCell.index();
var cellBelow = currentCell.closest("tr").next().children().eq(currCellIndex);
grid.editCell(cellBelow); //Put the cell into editMode in grid
//grid.editRow(currentCell.parent().next());
}
Attached is a visual of the grid, the yellow cells are the only one's being edited.
Any help would be great.
Since this is a 10 key function for the most part, ideally I would like tab go to the next editable cell, which is the next row. (As designed, tab goes to next cell - regardless of being editable) In other applications, tab goes to the next editable cell. If all cells editable showed as a textbox in Batch Edit, that would be an option as well.
I've tried to capture the current cell, then after saving set the cell below to be editable. But the grid synchronization isn't complete or grid is refreshing or something and the first cell in grid is selected.
Would be better if this could be connected to a Tab key from the cell being edited.
For the Save Event:
.Events(events =>
{
events.Save(
@<text>
function (e) {
var currentCell = $("#AreaPhysicalCountGrid_active_cell");
setTimeout(function () {
$("#AreaPhysicalCountGrid" + @ViewBag.CycleCountID).data("kendoGrid").dataSource.sync();
SelectNextEditableCell(currentCell);
});
}
</text>);
})
My function for changing to the next editable cell.
function SelectNextEditableCell(currentCell) {
var grid = $("#AreaPhysicalCountGrid").data("kendoGrid");
//var currentCell = $("#AreaPhysicalCountGrid_active_cell");
//Get index of the td (2)
var currCellIndex = currentCell.index();
var cellBelow = currentCell.closest("tr").next().children().eq(currCellIndex);
grid.editCell(cellBelow); //Put the cell into editMode in grid
//grid.editRow(currentCell.parent().next());
}
Attached is a visual of the grid, the yellow cells are the only one's being edited.
Any help would be great.