Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap Popup window not showing data from server side on Grid View Row Command event, c#
    text
    copied!<p>I have grid view inside an update panel which on click of link button fires grid view row command event. On this row command event I want to open a bootstrap popup and bind another grid from code behind which is also in an update panel. </p> <p>Problem is grid view fires row command event and data is fetched correctly and binds it to the popup grid view but popup does not display's data of newly bound grid view. </p> <p>I have tried triggers as well for update panel my code is please help me, I am really stuck in this, thanks in advance</p> <pre><code> &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false"&gt; &lt;ContentTemplate&gt; &lt;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"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="Response"&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton class="popup" data-toggle="modal" ID="lnkbtnSelectAnswer" Visible='&lt;%#Eval("ResponseTitle") != null %&gt;' runat="server" Text="Choose From Previous Answer" CommandName="AddAnswerToTextBox" CommandArgument='&lt;%# ((GridViewRow) Container).RowIndex %&gt;'&gt;&lt;/asp:LinkButton&gt; &lt;br /&gt; &lt;asp:TextBox ID="txtResponse" runat="server" TextMode="MultiLine" Height="60px" Width="400"&gt;&lt;/asp:TextBox&gt; &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic" ValidationGroup="Submit" ControlToValidate="txtResponse" ErrorMessage="*"&gt;&lt;/asp:RequiredFieldValidator&gt; &lt;br /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;EmptyDataTemplate&gt; &lt;b&gt;No record found&lt;/b&gt; &lt;/EmptyDataTemplate&gt; &lt;/asp:GridView&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="gvResponseList" EventName="RowCommand" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="divPreviousResponses" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Prevoius Answers&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;asp:GridView ID="gvSelectAnswer" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ListId" Width="550px" AllowPaging="True" ItemType="TextualUserAnswersEntity" OnRowCommand="gvSelectAnswer_RowCommand" OnPageIndexChanging="gvSelectAnswer_PageIndexChanging"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="Previous Response"&gt; &lt;ItemTemplate&gt; &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:Label ID="lblResponse2" runat="server" Text='&lt;%#Eval("ResponseTitle") %&gt;'&gt;&lt;/asp:Label&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;EmptyDataTemplate&gt; &lt;b&gt;No record found &lt;/b&gt; &lt;/EmptyDataTemplate&gt; &lt;/asp:GridView&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- /.modal-content --&gt; &lt;/div&gt; &lt;!-- /.modal-dialog --&gt; &lt;/div&gt; &lt;!-- /.modal --&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload