Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to access parent grid id from subgrid in jqgrid
- if (jqent.isReq) {
- sbGrid.Append("subGrid: true,");
- sbGrid.Append("subGridRowExpanded: function (subgrid_id, row_id) {");
- sbGrid.Append(" $('#' + subgrid_id).html(renderhtmlforSubgrid(subgrid_id, row_id));},");
- }
- function renderhtmlforSubgrid(subgrid_id, row_id) {
- var script = '<div style="margin-left:10px; margin-top:10px; margin-bottom:10px;">';
- script += '<textarea class="txtCommentwatermarkOn" id="txtCommentSection" name="txtCommentSection" rows=2 cols=20>Type your comments here</textarea>';
- script += '<input onclick="RenderModalPopup(' + row_id + ',' + subgrid_id + ',this);" type="image" id="image" src="../../Content/Images/commentIcon.png"/>';
- script += '</div>';
- return script;
- }
- function RenderModalPopup(rowid, tableid, event) {
- var dataFromRow = $('#tblArtifact1').jqGrid('getRowData', rowid);
- var PhaseArtifactId = $('#tblArtifact1').jqGrid('getCell', rowid, 'ID');
- ..........................
- renderhtmlforSubgrid.call(this, subgrid_id, row_id)
- renderhtmlforSubgrid(subgrid_id, row_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement