Reputation: 5911
i open UI dialog in this way:
var $dialog = jQuery('#dialog');
$dialog.load('mySite.aspx');
$dialog.dialog({
autoOpen: false,
title: 'Add New Contact Personel',
modal: true,
height: 350,
width: 400,
show: 'puff',
hide: 'puff',
close: function (event, ui) {
$dialog.html('');
$dialog.dialog('destroy');
}
});
$dialog.dialog('open');
and after i close this using cross in right upper corent, all others buttons not connected to UI dialog doesn't work, for example linkButton in gridview below lost his meaning, in firefox does't work, in chrom redirect to page which preavious UI dialog used, but when i refresh the page, everything seems to work fine untill i click again to open UI dialog, then all others links doesn't work again.
<asp:GridView ID="userGridView" runat="server"
AutoGenerateColumns="False"
GridLines="None"
AllowPaging="true"
DataKeyNames="UserId"
OnRowCommand="UserGridViewRowCommand">
<Columns>
<asp:BoundField DataField="UserId" Visible="false"/>
<asp:BoundField DataField="FirstName" HeaderText="First Name" />
<asp:TemplateField HeaderText="Actions" HeaderStyle-Width="75px" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:LinkButton ID="ChartLinkBtn" ToolTip="go to EAS (user page)" CommandArgument='<%# Eval("UserId") %>' CommandName="User" runat="server"><img src="../Styles/icons/chart.png" style="border:0px" alt="text"/></asp:LinkButton>
<asp:LinkButton ID="DeleteLinkBtn" ToolTip="delete this user" CommandArgument='<%# Eval("UserId") %>' CommandName="Delete" runat="server"><img src="../Styles/icons/delete.png" style="border:0px" alt="text"/></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Upvotes: 0
Views: 3687
Reputation: 85
if this is any help, why not force the full-postback altogether?
close: function (event, ui) {
$dialog.html('');
$dialog.dialog('destroy');
__doPostBack(); //to perform a full postback
}
or try this (put this within the javascript tags) ...
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
var myDiv = $("#dialog").dialog({ autoOpen: false, modal: true, open: function (type, data) {
$(this).parent().appendTo("form");
}
});
});
cheers!
Upvotes: 2