jqGrid:自定义行显示 [英] jqGrid: Customize row display

查看:160
本文介绍了jqGrid:自定义行显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用不带URL的subgrid? 因为我想在行下显示数据,但是该数据不需要来自ajax调用.只是根据行而使用不同颜色的标签.

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.

谢谢

推荐答案

如果您使用 subGridRowExpanded 事件处理程序,您可以完全指定div的包含内容,该内容将显示在扩展行之后的行下方.请参阅来自演示 stackoverflow.com/questions/4114498/jqgrid-how-we-can-make-an-custom-row-detail/4115481#4115481>答案:

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:

例如,您可以按照子网格作为网格示例,但对子网格使用datatype:'local'data参数而不是url.

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.

这篇关于jqGrid:自定义行显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆