当前位置: 代码迷 >> JavaScript >> jqGrid如何给某个单元格添加事件
  详细解决方案

jqGrid如何给某个单元格添加事件

热度:410   发布时间:2013-08-01 15:23:18.0
jqGrid怎么给某个单元格添加事件
我在编辑行editRow,所以如果在用onCellSelect就冲突了,且,我想要的是只为某个确定的单元格添加事件,其他的则不要,如:colNames:['序号','商品编号','条形码','商品名称'],
colModel:[
{name:'idp',index:'idp',width:80,editable:true},       {name:'code',index:'code', width:110,editable:true},
{name:'txm',index:'txm', width:100,editable:true},
{name:'name',index:'name', width:100,editable:true}
该表格就一行数据,只为code 单元格添加事件,怎么弄的
jqGrid 表格?单元格?事件

------解决方案--------------------
给正在编辑的行添加onCellSelect事件?没明白具体要表达什么。。
------解决方案--------------------
自定义事件 。
{name:'code',index:'code',formatter: cLink, width:110,editable:true},


function cLink(cellvalue, options, rowObject){
return '<a href="javascript:void(0)" onclick="">xxx</a>';