问题描述
有人给我一些示例代码以使我的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-我们如何制作自定义行详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!