GridView使用ajax modalpopup扩展程序删除确认... [英] Gridview Deletes Confirmation using ajax modalpopup extender...

查看:81
本文介绍了GridView使用ajax modalpopup扩展程序删除确认...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们...

我想知道如何为Gridview Deletes创建一个Ajax modalpopup扩展器...我应该在gridview中使用Delete按钮图标来做到这一点....请按照我目前的gridview代码进行参考....


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....


<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>




我在Google中搜索过,但对我来说还不清楚...

谁能建议我该怎么做....




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

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

推荐答案


使用按钮单击打开模型弹出窗口并不困难.在gridview中,一旦尝试将Button属性的CommandName设置为等于"Update".
我认为这行得通.
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.


尝试使用Javascript来显示弹出窗口以及在单击取消时隐藏......

编写一个javascript函数,并在gridview内的命令按钮的onclienclick事件上调用它.

如果用户单击确定,则返回true

否则为假

只需隐藏并显示弹出窗口,然后再从javascript函数返回值即可.

希望对您有所帮助.
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.


这篇关于GridView使用ajax modalpopup扩展程序删除确认...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆