Button server click event not triggering on gridview itemtemplate.

Adrian Cross
Adrian Cross used Ask the Experts™
Hi, I have a grid with a few columns. One of them is button, inside a template, which opens a modal.
I'd like to execute a server event when this column is clicked but the event is not triggering because of the modal.

Any ideas how to trigger a server click event as well as opening the modal on client click??

<asp:GridView ID="dgvData" runat="server" ....>
      <asp:LinkButton runat="server"  Text='<%# Eval("Total") %>' ForeColor="DarkGreen" Font-Size="12px"
        ControlStyle-BorderStyle="None" ControlStyle-Width="25px"



Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This might help.

I have a grid with a modal popup.  The Ajax definition:  With Runat="server"

<ajaxToolkit:ModalPopupExtender ID="modPop" runat="server"
            DropShadow="false" >

Panel1 contains a table.

In the grid there's a button:
<asp:Button ID="UpdateBtn" runat="server" CausesValidation="False" Text="Update"
                  CommandName="Update" CommandArgument='<%# Eval("thisID") %>' OnCommand="UpdateBtn_Click"/>

In the code behind for UpdateBtn_Click  have the code modPop.show()

So the grid does processing then displays the popup.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial