Keep persistent bootstrap modal window when filling gridview

0

What I am doing is the following:

In a form of Asp.Net a user presses a button, which opens a modal window of Bootstrap like the one attached in the following image:

When that modal window is open, the user has the possibility to capture a BP number or a BP name and perform the search, from which the results should be displayed in a gridview with the matches. The problem comes here . We agree that when the user presses the button Search of the modal window, so that the results are shown, a Postback is made to populate the gridview with the coincidences.

What I want to do is that the modal window remains open to show the results. Now what it is doing to me is that the modal window as such disappears, but the background remains active, as I show in the following capture:

So what I did within the event of btnSearchBP_Click , was to add the following line:

ScriptManager.RegisterStartupScript(Me, Me.GetType(), "modal", "$('#addModal').modal('show');", True)

With that line you already show me the well-ordered information in grid , but it adds an "extra fund" that does not disappear at the time of making my BP selection.

So, what is the correct way to make the modal window persistent while loading the information in gridview ?

    
asked by Federico Prado 14.04.2016 в 23:21
source

1 answer

0

well first the bootstrap modal call it with a deasp button adding this code to the button

OnClientClick="$('#myModal').modal('hide');"

after calling the modal, to the grid that I am going to put in the modal, I pass an update panel, so that it maintains the query and then it is nothing more than aesthetics in your modal

 <asp:AsyncPostBackTrigger ControlID="btnbitacora" EventName="Click" />
       </Triggers>
       <ContentTemplate>
          <fieldset>
             <asp:GridView ID="Grid_bitacora" runat="server"></asp:GridView>
          </fieldset>
       </ContentTemplate>
</asp:UpdatePanel>
    
answered by 19.09.2016 в 20:11