日期:2014-05-16  浏览次数:20377 次

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>';