Problem: jqGrid with subgirds. I want to disable the expand/collapse functionality for some rows of the main grid.
A:
Unfortunately there is no jqGrid API for this. You will have to wait until the grid is created and then, perhaps from the loadComplete
event, you will need to manually loop over all rows and disable selected ones.
If you inspect the DOM elements that compose the grid you can probably figure out a way to remove / disable the expander for selected rows. Perhaps by using jQuery.remove.
Justin Ethier
2010-05-27 21:23:36
A:
Add this to the gridConfig
afterInsertRow: function(rowid, aData, rowelem) {
// Remove the subgrid plus button except for rows that have exceptions
if (CONDITION) {
$('#' + rowid).children("td.sgcollapsed").unbind().html("");
}
},
Frank
2010-06-22 19:34:00