如何获取 keypress/keydown 事件的列名/索引。认为 :
$("#myGrid").keydown(keydownEvent);
keydownEvent(e)
是一个函数。现在如何从keydownEvent(e)
函数中按下它的列中获取?
编辑:
正如@Rohan Kumar 要求的一些代码,我给出了这个函数:
function keydownEvent(e) {
if (e.keyCode == 9 || e.which == 9) {// Tab pressed
//here I want to get the Column Index/Name from which key is pressed
}
if (e.keyCode == 113 || e.which == 113) //f2 press
{
var rowid = $('#myGrid').getGridParam("selrow");
ondblClickRowEvent(rowid, rowid, 1, e);
}
}
抱歉,我以为是隐含的。我的错!HTML:
<table id='myGrid' ></table>