jquery - How to find id of dynamically created jqGrid? -


so task add new row in grid created using jqgrid dynamically. did study , saw method: $("#grid").addrowdata(rowid,data, position, srcrowid);

but use above method need first find out id("#grid") has been given grid.

when trying inspect elements see elements such :

   <div style="width: 1030px;" dir="ltr" id="gbox_grid-34e0dc5c-e79e-4011-80c8-30f8f0dbf61c" class="ui-jqgrid ui-widget ui-widget-content ui-corner-all">    .....    ....        <div style="width: 1030px;" id="gview_grid-34e0dc5c-e79e-4011-80c8-30f8f0dbf61c" class="ui-jqgrid-view">            ....all grid data....        </div>   </div> 

thanks help

var gridid = $(".ui-jqgrid").attr("id"); 

Comments