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