i'm constructing a jqgrid which is working fine ... grid construction
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));},");
}
i have a subgrid with textarea and an image control that will be rendered by the below code
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;
}
on click of the image "RenderModalPopup" function will be triggered
function RenderModalPopup(rowid, tableid, event) {
var dataFromRow = $('#tblArtifact1').jqGrid('getRowData', rowid);
var PhaseArtifactId = $('#tblArtifact1').jqGrid('getCell', rowid, 'ID');
..........................
Every thing is working fine... Now the issue is i'm hardcoding the grid id as "tblArtifact1" to fetch the column values. which needs to be removed. Can i get the grid id? is there any predefined parameter/function to get it?
I'm stuck up.. please help.