Can anyone point to multiple subgrid at the same level demo or example . I have already looked at http://www.trirand.net/demoaspnet.aspx. I'm looking for something in javascript.
相关问题
- How to bind a dropdown list inside jqgrid row cell
- jQgrid filterToolbar fails with searchOnEnter
- Detecting checkbox event in jqGrid cell
- How to alter data received from the server before
- How to access other row data from a cell's cus
相关文章
- jqGrid Row Object in onSelectRow
- Weird behavior of jqgrid Grouping
- jQuery - jqGrid - submit buttons in each row
- JqGrid: sorting of local data
- How to Expand/Shrink row in Jqgrid dynamically
- VB.net FileUpload using Ajaxcall
- jqGrid addRowData doesn't work with grid as su
- How to turn off column highlighting (on hover) for
The demo from the trirand.net shows just the following
It's very easy to create the subgrids like on above picture. You should just understand how the technique Subgrid as Grid works.
If the user click on "Expand" ("+") icon jqGrid create empty new row below of the expanding. The row (
<tr>
) will get the class"ui-subgrid"
. Inside of the row jqGrid create two<td>
elements onetd.subgrid-cell
and anothertd.subgrid-data
with the main subgrid information. jqGrid assigncolspan
so that the<td>
will be extended till the last column of the grid. Inside of thetd.subgrid-data
jqGrid create emptydiv.tablediv
. The empty div get uniqueid
attribute which will be constructed from the id of the grid id, the character "_" and id of expanding row.The next step is the mostly important. jqGrid call
subGridRowExpanded
callback. The first parameter of the callback is theid
of empty<div>
(thediv.tablediv
) where "subgrid" content should be placed. Instead of<table>
element one can place any other HTML fragmant . See the old demo from the answer. So to create "multiple subgrid at the same level" one need just place two<table>
element with some unique ids and use jqGrid to create grids on place of the tables.