jqgrid展开子表
1、onSelectRow 当选中表格中的行时将要发生的事情
onSelectRow:function (rowid,status) {
selId =rowid; //给最外层的selId赋值
},
2、子表格
三个方法,如下表,可以实现对subgrid的expand、collapse以及两者之间的切换(toggle)。
Method | Parameters | Returns | Description |
---|---|---|---|
expandSubGridRow | rowid | jqGrid object | dynamically expand the subgrid row with the id = rowid |
collapseSubGridRow | rowid | jqGrid object | dynamically collapse the subgrid row with the id = rowid |
toggleSubGridRow | rowid | jqGrid object | dynamically toggle the subgrid row with the id = rowid |
$(document).on("click", "#grd tr.jqgro