Hi!,
Attached there is a sample page to test this behavior.
It consists of a button and an update panel, when the button is clicked a new webdialogwindow is added to the page but the styles of the side borders is wrong only the first time. If you close the webdialogwindow and hit the button again it will appear normally.
It happens only on firefox, not in chrome or IE8/9
Thanks in advance.
The problem with your suggestion is that the wdw would be already added on the page right? We want to avoid that besides we not always need the wdw. That's way we want to add it by code once we need it.
Is there any chance that this behaviour was a bug and could be fixed for future releases?
Thanks.
Hello rickycl,
If you have any other questions, please do not hesitate to ask.
Hi rickycl,
A possible solution would be to add the dialog window on page load and set its WindowState to 'Hidden'. On button click you could add content to the dialog and make it visible:
protected void Page_Load(object sender, EventArgs e)
{
WebDialogWindow w = new WebDialogWindow();
w.Width = 500;
w.Height = 400;
w.ID = "WebDialogWindow1";
w.InitialLocation = DialogWindowPosition.Centered;
w.WindowState = DialogWindowState.Hidden;
UpdatePanel1.ContentTemplateContainer.Controls.Add(w);
}
protected void Button1_Click(object sender, EventArgs e)
WebDialogWindow wdw = (WebDialogWindow)UpdatePanel1.ContentTemplateContainer.FindControl("WebDialogWindow1");
wdw.WindowState = DialogWindowState.Normal;
If you have any concerns, please feel free to contact me.
That's not an option for us right now, our architechture needs the controls to be added programmatically.
Is there another option to add the wdw by code as any other control?
Thanks!
I would suggest that you add the dialog window in your markup and set its properties the following way:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="500px"
Width="300px" WindowState="Hidden" InitialLocation="Centered">
</ig:WebDialogWindow>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Then on button click just change the WindowState property to 'normal':
WebDialogWindow1.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal;
Please let me know if this helps.