Problem: jqGrid with subgirds. I want to disable the expand/collapse functionality for some rows of the main grid.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
Add this to the gridConfig
I actually found a way:
There was a bit of a problem. The code @Frank removed the icon, but the 'click' event was still triggered. Trying to unbind the 'click' event doesn't seem to work, probably because it is attached later on ( maybe on gridComplete). Anyway, I figured that the click event is attached using one of the 'ui-sgcollapsed sgcollapsed' classes, so if you remove them, the event won't be attached.
Hope it helps.
If you are trying to disable or hide the subgrids expand and collapse button then use this on loadcomplete,
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.