Gridview中的Base Admin Confirm对话框未触发回发 [英] Postback not fired for Base Admin Confirm dialog in Gridview

查看:72
本文介绍了Gridview中的Base Admin Confirm对话框未触发回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Gridview,我从这里使用Base Admin Bootstrap HTML 5主题 Base Admin Bootstrap主题 [ ^ ]



我的Gridview代码如下:



I have a Gridview and I am using the Base Admin Bootstrap HTML 5 theme from here Base Admin Bootstrap theme[^]

My Gridview code is as follows:

<asp:GridView ID="grdVehicleList" OnRowCommand="grdVehicleList_RowCommand"  runat="server"

                    OnRowDeleting="grdVehicleList_RowDeleting"  CssClass="table table-striped table-bordered"  AutoGenerateColumns="False">
                    <Columns>
                        
                        <!-- Some Columns here -->

                        <asp:TemplateField HeaderText="Delete">
                            <ItemTemplate>                                
                                    <asp:LinkButton runat="server" ID="lnkDelete" Text="" CommandName="Delete"  CssClass="msgbox-confirm icon-remove"></asp:LinkButton>                                   
                            
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>





我已将确认拨号框附加到删除按钮。但是当我从确认框中选择是时,不会触发服务器端事件



I have attached the confirm dialig box to the 'Delete' button. But the server side event

OnRowCommand="grdVehicleList_RowCommand"





jQuery文件中对话框的代码如下:



is not fired when I select Yes from the confirm box.

The code for dialog in the jQuery file is as follows:

$('.msgbox-confirm').live ('click', function (e) {
		$.msgbox("Are you sure that you want to permanently delete the selected element?", {
		  type: "confirm",
		  buttons : [
		    {type: "submit", value: "Yes"},
		    {type: "submit", value: "No"},
		    {type: "cancel", value: "Cancel"}
		  ]
		}, function(result) {
		    $("#result2").text(result);		    
		});		
	});





我尝试解雇



I tried firing a

$("form").submit();

function(result)

但仍然没有回发。



有人可以告诉我指示吗?



请随时询问调查所需的任何信息问题。



提前谢谢...

but still it does not postback.

Can somebody show me the directions?

Please feel free to ask any information needed to investigate the issue.

Thanks in advance...

推荐答案

' 。msgbox-confirm')。live(' click' function (e){
('.msgbox-confirm').live ('click', function (e) {


.msgbox( 您确定要永久删除所选元素吗?,{
类型: 确认
按钮:[
{type: 提交,值: },
{type: 提交,值: },
{type: 取消,值: 取消}
]
}, function (result){
.msgbox("Are you sure that you want to permanently delete the selected element?", { type: "confirm", buttons : [ {type: "submit", value: "Yes"}, {type: "submit", value: "No"}, {type: "cancel", value: "Cancel"} ] }, function(result) {


#result2)。text(result) ;
});
});
("#result2").text(result); }); });





我尝试解雇



I tried firing a


这篇关于Gridview中的Base Admin Confirm对话框未触发回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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