Hi there,
My goal for this grid is support fast bulk editing of a table. My assumption is that the users will be all keyboard oriented and looking to enter in alot of data at once. I want to be able to edit a field and tab to the next field for editing. It looks like when you have navigatable ,incell editing, and autosync when you leave the column with changes instead of tabing to the next column, tab doesn't go anywhere. This pretty much kills the reason for the grid (fast keyboard editing).
I can find one similar question but i can't figure out a solution that really works. This approach below does sort of work in that it does refocus to the next cell. However, there's a visible jump of focus to the first cell and the whole thing takes way too long. Is there a way I can do this in a single event handler? Ideally I wouldn't wait for the autosync to happen, but would immediately goto the next cell so the user can start typing there as well.
thanks,
andy
var gridOptions = {
edit: function(e) {
nextCell = {
cellIndex: e.container[0].cellIndex,
uid: e.model.uid,
};
console.log("saving", nextCell);
},
dataBound: function(e) {
var grid = e.sender;
console.log("set focus to next cell", nextCell);
var nextCellIndex = nextCell.cellIndex + 1;
var row = grid.items().filter("tr[data-uid=" + nextCell.uid + "]");
var cell = row.find("td:eq(" + nextCellIndex + ")");
console.warn("setting cell: ", cell);
// grid.current(cell);
grid.editCell(cell);
}
};
My goal for this grid is support fast bulk editing of a table. My assumption is that the users will be all keyboard oriented and looking to enter in alot of data at once. I want to be able to edit a field and tab to the next field for editing. It looks like when you have navigatable ,incell editing, and autosync when you leave the column with changes instead of tabing to the next column, tab doesn't go anywhere. This pretty much kills the reason for the grid (fast keyboard editing).
I can find one similar question but i can't figure out a solution that really works. This approach below does sort of work in that it does refocus to the next cell. However, there's a visible jump of focus to the first cell and the whole thing takes way too long. Is there a way I can do this in a single event handler? Ideally I wouldn't wait for the autosync to happen, but would immediately goto the next cell so the user can start typing there as well.
thanks,
andy
var gridOptions = {
edit: function(e) {
nextCell = {
cellIndex: e.container[0].cellIndex,
uid: e.model.uid,
};
console.log("saving", nextCell);
},
dataBound: function(e) {
var grid = e.sender;
console.log("set focus to next cell", nextCell);
var nextCellIndex = nextCell.cellIndex + 1;
var row = grid.items().filter("tr[data-uid=" + nextCell.uid + "]");
var cell = row.find("td:eq(" + nextCellIndex + ")");
console.warn("setting cell: ", cell);
// grid.current(cell);
grid.editCell(cell);
}
};