解决方案 »

  1.   

    把bind 改为 on 试试看,好像是jquery的高版本中,都是用on来绑定事件了。
      

  2.   

    formatter只能返回字符串不能返回dom对象,span增加onclick事件,将需要的参数数据传递进行就好了SetTop = function (value, row, index) {
    return "<span style='cursor:pointer' onclick='func(\""+value+"\","+index+")'></span>";//row要转为字符串后传递,没必要,可能回导致字符串不闭合,可以通过datagrid的selectRow+getSelected方法组合获取到
    }function func(value,index){
    var row=$('#xxx').datagrid('selectRow',index).datagrid('getSelected')
    }