How to set focus to cell in Kendo UI for MVC Grid

2020-04-20 19:16发布

问题:

I need to set the focus on a Kendo UI Grid to a specific cell, in the first row during the DataBound event. I'm using Kendo for MVC, here is the definition of my column:

columns.Bound(o => o.QtyCurrentlyReceived).Width(75).Title("Qty Curr Rx");

回答1:

Okey then this is the code that should do the work for you:

var theCell = $('#Grid tbody td:eq(3)');//sample selector for a cell
$('#Grid').data('tGrid').editCell(theCell);//ask the Grid to put that cell in edit mode