dhtmlXGrid复选框点击事件
var mygrid;
//加载初始界面
$(function () {
mygrid = new dhtmlXGridObject('colour');
mygrid.setImagePath(getUrlPath() + "/static/plugg/dhtmlx/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("#master_checkbox,状态,查看,编辑,xxx,xxx,xxx,xxx,xxx,xxx,xxx");
mygrid.setInitWidths("40,50,50,50,250,250,250,250,250,80,80");//宽度
mygrid.setColTypes("ch,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
mygrid.setColAlign("center,center,center,center,center,center,center,center,center,center,center");
mygrid.setSkin("colour");
mygrid.attachEvent("onCheck", doOnCheck);
mygrid.pagingLayout("count,first,prev,page,next,last,limit,refresh,skip");//设置分页排版
mygrid.pagingLimits("10,20,50");//设置每页条数的选择项
mygrid.enablePagingon(true, 10);//true显示分页、10为默认每页条数
mygrid.setPageCurrent(1);//设置当前页
mygrid.init();
showCkInfo();
})
function doOnCheck(rowId,cellIndex,state) {
alert("Checkbox in the row with id="+rowId+" was "+state);
}