开发者

How can I set a Table ID on the table generated by JQGrid?

I can't seem to find anything in the JQGrid documentation, but I want to select the table generated by JQGrid and want to set a unique ID on the generated t开发者_开发百科able, is this easily done?


It seems a misunderstanding. To use jqGrid you should define at least the HTML fragment like

<table id="list"></table>

and use $('#list').jqGrid({/*parameters*/}) to convert the existing table to the grid. The unique id must exist before you call jqGrid. The id will be used to construct ids on other elements of grid. (see for example here for detailes). After creation of the grid you can't change the id of the table element. If it is really required to change the table id you have to destroy grid with respect of GridDestroy method, create new <table> element with the new id and then convert it to grid one more time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜