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

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

问题描述

有人给我一些示例代码以使我的Grid像这样.我在文档中读到jqgrid仅支持subgrid.

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天全站免登陆