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

Grid - Skip on Edit Tabbing

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 08 Nov 2012, 04:39 PM
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?

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 13 Nov 2012, 02:27 PM
Hello Jamie,

I am not sure if I understand your case correctly. Could you please create a jsfiddle/jsbin with your case so we can see the actual problem and propose a solution?

Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jamie
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or