JQGrid - 我们如何制作自定义行详细信息 [英] JQGrid - How Can We make an Custom Row Detail

查看:16
本文介绍了JQGrid - 我们如何制作自定义行详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人给了我一些示例代码来使我的网格像这样.我在文档中读到 jqgrid 只支持子网格.

Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid.

在 Hierachy 中喜欢这个页面 http://trirand.net/demoaspnetmvc.aspx

like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx

谢谢!

推荐答案

在页面 自定义行详情 你可以看到如何使用 subGridRowExpanded 将自定义 HTML 数据显示为子网格数据的事件句柄.一般来说,如果你有任何标准的 jqGrid,你可以很容易地实现它.您只需将 subGrid: true 添加到网格并定义 subGridRowExpanded 将 html 附加到子网格:

On the page Custom Row Detail you can see how you can use subGridRowExpanded event handle to show custom HTML data as subgrid data. In general if you have any standard jqGrid you can implement the same very easy. You should just add subGrid: true to the grid and define subGridRowExpanded which append html to the subgrid:

subGridRowExpanded: function(subgrid_id, row_id) {
    var html = "<span>Some HTML text which corresponds the row with id="+
               row_id + "</span><br/>";
    $("#" + subgrid_id).append(html);
}

您可以在这里看到这个直播:

You can see this live here:

这篇关于JQGrid - 我们如何制作自定义行详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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