请教jquery easyui datagrid的问题
jquery吧
全部回复
仅看楼主
level 1
刚开始打开页面时表格显示正常,但反复打开/关闭两三次后表格的表头与数据发生错位,表头显示正常,但内容全部左偏,这是什么原因???
附代码:这是打开界面时从脚本执行的方法,数据能正确获取。
function ajaxBrand(){
$("#frm_brand_manage .easyui-datagrid:eq(0)").datagrid("resize");
$.ajax({
url: "/AjaxHandler/ProductHandler.ashx",
data: {
"cmd": "Brand_Get"
},
success: function (data) {
var objJson = eval('(' + data + ')');
$("#frm_brand_manage .easyui-datagrid:eq(0)").datagrid({
loadFilter: pagerFilter,
loadMsg: "正在加载品牌列表,请稍等....",
columns: [[
{ field: "KeyID", title: "KeyID", width: 100, align: "center", hidden: true },
{ field: "Brand", title: "品牌名称", width: 150, align: "center" },
{ field: "ImageFileUrl", title: "品牌Logo", width: 100, align: "center", formatter: formatBrandImage },
{ field: "BrandDesc", title: "描述", width: 100, align: "center" },
{ field: "SecKeyWord", title: "搜索关键字", width: 100, align: "center" },
{ field: "Status", title: "Status", width: 100, align: "center", hidden: true },
{ field: "StatusDesc", title: "当前状态", width: 100, align: "center" }
]]
}).datagrid('loadData', { total: 0, rows: [] }).datagrid({ loadFilter: pagerFilter }).datagrid("loadData", objJson);
}
});
}
2013年07月19日 05点07分 1
1