I seem to have an issue where with jQuery Grid (jqGrid) if I have loaded data where one of the cells has a table inside, it throws an error when onSelectRow() is fired and I call $(grid).getRowData(rowid).
jqGrid seems to be enumerating ALL of the TD elements in the selected row (including those which are children of the table within a given cell).
Is there a proper way to do this or to prevent jqGrid from enumerating those elements? 🙁
EDIT: In my particular case, the HTML was hidden until needed, so I was able to replace the TD’s with “xtd” on the server until sent out to the client. On the client-side, when I needed them HTML, I just replace “xtd” to “td”. Still wish there was a better way.
EDIT: I want to clarify, I desire a method of doing this that doesn’t modify the plugin. An well-written modification would still be nice.
Old but yet not solved.
Hi. Yes jqGrid has problem with inner
tableandtdbut there is a quick and useful fix. In filejquery.jqGrid.min(jqGrid 3.8.2 – jQuery Grid). Put file into js-beutifier or get not minified version and findgetRowDatafunction. Then you have to add extra condition to lookup foreachb("td", r).each(function (t) {to codeb("td[id!='-1']", r).each(function (t) {. In your inner table you should declare<td id="-1">. In this case you exclude your td from searching incolModel.Copy/Paste this code:
Finally where you want to put inner table do this:
Of course you can change
idattribute but I recommend fix this with htmlidattribute due to jQuery performance againstclassattribute.