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 table, is this easily done?
Asked
Active
Viewed 1,030 times
1 Answers
1
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.
-
You are absolutely right Oleg, funny enough I thought JQGrid had done some sort of destroy/create since I had wrapped in another table with no id. – Mark Kadlec Aug 31 '11 at 21:23
-
@Mark Kadlec: All things are simple after we know the answer. You are welcome! – Oleg Aug 31 '11 at 21:32