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>
<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"
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();
in the
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...