jqGrid: Customize row display

2019-09-05 17:47发布

问题:

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.