问题
Is it possible to use subgrid without url? Because I want to display data under my row, but this data doesn't need to come from an ajax call. It's just a label in different color depending of the row.
Thank you
回答1:
If you would use subGridRowExpanded event handler you can full specify the contain of the div which will be shown under the row after the expanded row. See very old demo from the answer:
So you can for example follow to the subgrid as grid example but use datatype:'local'
and data
parameter for the subgrid instead of the url
.
来源:https://stackoverflow.com/questions/6272900/jqgrid-customize-row-display