Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Frnds......

I want to know how to create a ajax modalpopup extender for the Gridview Deletes... I should use Delete button icon in gridview how to do that.... Follows my present gridview code for your references....


XML
<asp:Panel ID="Panel2" runat="server" Width="550px" HorizontalAlign="Center">
               <asp:GridView ID="Quote_Grid" runat="server" AutoGenerateColumns="False" BackColor="Linen" BorderColor="DeepPink" BorderWidth="1px"
               BorderStyle="Solid" AllowPaging="True" OnSelectedIndexChanged="Quote_Grid_SelectedIndexChanged" OnPageIndexChanging="Quote_Grid_PageIndexChanging" ShowFooter="True" OnRowDataBound="Quote_Grid_RowDataBound" OnRowDeleting="Quote_Grid_RowDeleting">
                   <Columns>
                       <asp:BoundField DataField="p_name" HeaderText="Item Name" />
                       <asp:BoundField DataField="qty" HeaderText="Quantity" />
                       <asp:BoundField DataField="rate_qty" HeaderText="Rate/Qty" />
                       <asp:BoundField DataField="unit_price" HeaderText="Unit Price" />
                       <asp:BoundField DataField="discount" HeaderText="Discount" />
                       <asp:BoundField DataField="tax_amt" HeaderText="Tax Amount" FooterText="Total Rs." />
                      <asp:BoundField DataField="total_amt" HeaderText="Total Amount" />
                       <asp:CommandField ShowSelectButton="True" />
                   </Columns>
                   <FooterStyle BackColor="SteelBlue" Font-Bold="True" ForeColor="White" />
               </asp:GridView>
             </asp:Panel>



I searched in google but it is not clear for me...

Can anyone suggest me how to do that....
Posted

It's little difficult to open a model popup using a button click which is in gridview, Once try to set the CommandName of Button property equal to 'Update'.
I think this would work.
 
Share this answer
 
Comments
Ra-one 13-Jul-11 2:57am    
Difficulty is the measure depends person by person. What you feel difficult may be easy for other... So never say something difficult without finding its solution. :)
try Javascript to show the popup as well as to hide on cancel click...

Write a javascript function and call it on the onclienclickevent of the commandbutton inside the gridview.

If user clicks ok return true

else false

just hide and show popup before returning values from javascript function.

Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900