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

如何给jqgrid在formediting状态下的input增加属性?
比如说在form eidt模式,点击某文本框,弹出日期选择
也就是说给某个编辑文本框增加  onfocus="calendar()"属性?
大神们帮忙
多谢啦

------解决方案--------------------
要配置dataEvents,事件不能直接当做属性来配置

   { name: 'flag', width: 20, sortable: true, editable: true,
     editoptions: { readonly: false, dataEvents: [{ type: 'focus', fn: function (e) { calendar() } }] } 
    };

参考:jqGrid通用编辑规则