<script type="text/javascript">
$(function(){
$("#dg").datagrid({
url:"../json/content.json",
//url:"../student.php",
striped:true,
width:400,
loadMsg:"正在加载中。。。。",
singleSelect:true,
title:"用户列表",
columns:[[
{
field:"name",
title:"账号"
} ,
{
field:"email",
title:"邮箱"
} ,
{
field:"date",
title:"创建时间"
}
]],
frozenColumns:[[
{field:'ck',title:"da",checkbox:true}
]],
toolbar: [{
iconCls: 'icon-edit',
handler: function(){alert('编辑按钮')}
},'-',{
iconCls: 'icon-help',
handler: function(){alert('帮助按钮')}
}],
onLoadSuccess: function () { //隐藏表头的checkbox
$("#dg").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
}
});
}); </script>