我是 JqGrid 的新手。我想在网格加载后更改列名。我努力了
$("#Gridname).jqGrid("setLabel","FirstName","Modifed FistName",{"text-align":"right"});
但它不工作。
Try putting your code inside of a window.setTimeout so that it runs after the grid has been created:
This is what I used to change my jqGrid column headers:
$(function () {
window.setTimeout(function () {
$("#Gridname).jqGrid("setLabel","FirstName","Modifed FistName", {"text-align":"right"});
}, 0);
});