0

我是 JqGrid 的新手。我想在网格加载后更改列名。我努力了

$("#Gridname).jqGrid("setLabel","FirstName","Modifed FistName",{"text-align":"right"});

但它不工作。

4

1 回答 1

0

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);
});
于 2012-06-18T02:42:45.527 回答