Is it possible to skip the on edit tabbing. I have a grid with image columns (that are a links). The databound column is a boolean (so normally it would be a checkbox). I want it to click and change the value. I've written code to help me with this but it brings up a side affect that changes the values when I tab through the columns. Here is example of the code I'm using (it's not exact).
OnDataBound:
$("#ReportGrid").keydown(function (ee) {
if (ee.which == 9) { // tab
ee.stopPropagation();
ee.preventDefault();
}
});
$('#ReportGrid').find('td.toggleImages').click(function (ee) {
var grid = $('#ReportGrid').data("kendoGrid");
grid.editCell($(this).parent());
});
OnEdit:
if (e.container.hasClass('toggleImages')) {
var acCell = $(e.container).find('a');
e.model.set(acCell.attr('name'), changeStyle(acCell)); //changeStyle changes the visual and flips the state.
}
If I place a break pint on each of these and hit "tab" to move into the image cell the OnEdit triggers before the KeyDown event.
Thoughts?
OnDataBound:
$("#ReportGrid").keydown(function (ee) {
if (ee.which == 9) { // tab
ee.stopPropagation();
ee.preventDefault();
}
});
$('#ReportGrid').find('td.toggleImages').click(function (ee) {
var grid = $('#ReportGrid').data("kendoGrid");
grid.editCell($(this).parent());
});
OnEdit:
if (e.container.hasClass('toggleImages')) {
var acCell = $(e.container).find('a');
e.model.set(acCell.attr('name'), changeStyle(acCell)); //changeStyle changes the visual and flips the state.
}
If I place a break pint on each of these and hit "tab" to move into the image cell the OnEdit triggers before the KeyDown event.
Thoughts?