jquery - Bootstrap Popup window not showing data from server side on Grid View Row Command event, c# -
i have grid view inside update panel on click of link button fires grid view row command event. on row command event want open bootstrap popup , bind grid code behind in update panel.
problem grid view fires row command event , data fetched correctly , binds popup grid view popup not display's data of newly bound grid view.
i have tried triggers update panel code please me, stuck in this, in advance
<asp:updatepanel id="updatepanel2" runat="server" updatemode="conditional" childrenastriggers="false"> <contenttemplate> <asp:gridview id="gvresponselist" runat="server" autogeneratecolumns="false" cellpadding="4" datakeynames="listid" width="550px" allowpaging="true" onrowcommand="gvresponselist_rowcommand" cssclass="table table_standard_inbox table-striped table-bordered"> <columns> <asp:templatefield headertext="response"> <itemtemplate> <asp:linkbutton class="popup" data-toggle="modal" id="lnkbtnselectanswer" visible='<%#eval("responsetitle") != null %>' runat="server" text="choose previous answer" commandname="addanswertotextbox" commandargument='<%# ((gridviewrow) container).rowindex %>'></asp:linkbutton> <br /> <asp:textbox id="txtresponse" runat="server" textmode="multiline" height="60px" width="400"></asp:textbox> <asp:requiredfieldvalidator id="requiredfieldvalidator1" runat="server" display="dynamic" validationgroup="submit" controltovalidate="txtresponse" errormessage="*"></asp:requiredfieldvalidator> <br /> </itemtemplate> </asp:templatefield> </columns> <emptydatatemplate> <b>no record found</b> </emptydatatemplate> </asp:gridview> </contenttemplate> <triggers> <asp:asyncpostbacktrigger controlid="gvresponselist" eventname="rowcommand" /> </triggers> </asp:updatepanel> <!-- modal --> <div class="modal fade" id="divpreviousresponses" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">prevoius answers</h4> </div> <div class="modal-body"> <asp:gridview id="gvselectanswer" runat="server" autogeneratecolumns="false" cellpadding="4" datakeynames="listid" width="550px" allowpaging="true" itemtype="textualuseranswersentity" onrowcommand="gvselectanswer_rowcommand" onpageindexchanging="gvselectanswer_pageindexchanging"> <columns> <asp:templatefield headertext="previous response"> <itemtemplate> <asp:updatepanel id="updatepanel1" runat="server" updatemode="conditional"> <contenttemplate> <asp:label id="lblresponse2" runat="server" text='<%#eval("responsetitle") %>'></asp:label> </contenttemplate> </asp:updatepanel> </itemtemplate> </asp:templatefield> </columns> <emptydatatemplate> <b>no record found </b> </emptydatatemplate> </asp:gridview> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">close</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal -->
i resolve issue in following way: 1. display gridview html table formatted jquery's datatable lib data table has sent json server side 2. on click of table rows make ajax call server side (as json) other information need display , parse body of bootstrap's modal. work , important - work faster how trying now
Comments
Post a Comment