Button server click event not triggering on gridview itemtemplate.

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

Adrian CrossAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.