如何在 MVC Grid 的 Kendo UI 中将焦点设置为单元格 [英] How to set focus to cell in Kendo UI for MVC Grid
本文介绍了如何在 MVC Grid 的 Kendo UI 中将焦点设置为单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在 DataBound 事件期间在第一行中将 Kendo UI Grid 上的焦点设置为特定单元格.我正在将 Kendo 用于 MVC,这是我的专栏的定义:
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");
columns.Bound(o => o.QtyCurrentlyReceived).Width(75).Title("Qty Curr Rx");
推荐答案
好吧,这是应该为您完成工作的代码:
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
这篇关于如何在 MVC Grid 的 Kendo UI 中将焦点设置为单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文