Hello!
After updating jqGrid to the latest releases (jqGrid 4.3.1, jQuery 1.7.1) and using the new idPrefix option for my grids I detected the following problem:
In some cases the idPrefix is added/used twice for the table rows id attribute (… id=”pre_pre_12“). This problem seems to occur when using a grid with local data added via addRowData …
myTable.jqGrid(“clearGridData”);
myTable.jqGrid(“addRowData”, “id”, myData);
myTable.jqGrid('sortGrid', 'name', true, 'asc');
jqGrid calls the following internal functions: addRowData and then addJSONData for each row … I think this is the cause of the problem, why the prefix is added twice.
On the other hand, when using server side data (JSON) the ids are set correctly using the idPrefix only once. (… id=”pre_12“)
I've solved the problem by checking each time the prefix is appended, if it is already included in the ID and only add it if not.
But I don't think this is a really good solution. Maybe someone who knows the jqGrid code better could provide a clean bugfix for that problem.
Kind regards,
Klaus.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top