Hi,
I want to use the WebDialogWindow as .Net Panel control to host other controls. So I included WebDialogWindo like the below:
<ig:WebDialogWindow runat="server" ID="RegistrationFormDialog" Width="500px"
Modal="false" WindowState="Normal" Resizer-Enabled="false" Moveable="False" BackColor="Transparent">
<Header CloseBox-Visible="false" CaptionText="Notes" MaximizeBox-Visible="true" MinimizeBox-Visible="true">
<MaximizeBox Visible="false"></MaximizeBox>
<MinimizeBox Visible="false"></MinimizeBox>
<CloseBox Visible="False"></CloseBox>
</Header>
<ContentPane ScrollBars="Hidden">
<Template>
</Template>
</ig:WebDialogWindow>
<asp:GridView ...>
</asp:Gridview>
I've placed a GridView control below the WebDialogWindow, when I run the page WebDialogWindow is displaying on top of GridView so I am not able to see the gridview properly , How to display Gridview after WebDialogWindow?
Thanks
WebDialogWindow was designed as top control with absolute position. There is no explicit property to modify that. However, it is easy to do that using css class or javascript.
Below are examples for those 2 options:
1. <style type="text/css"> .staticPos{position:static !important;} </style>...<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="300px" Height="300px" CssClass="staticPos"></ig:WebDialogWindow>
2.<script type="text/javascript">function WebDialogWindow1_Initialize(sender, eventArgs){ sender.get_element().style.position = 'static';}</script><ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="300px" Height="300px"> <ClientEvents Initialize="WebDialogWindow1_Initialize"></ClientEvents></ig:WebDialogWindow>
Hi Viktor,
I am having issue with webtab and webDialogWindow. WebDialogWindow displaying inside webtab.
<ig:WebDialogWindow ID="wbDialog" runat="server" Height="90%" Width="90%" UseBodyAsParent="true" Modal="true" InitialLocation="Centered" Moveable="true" ModalTabIndices="false" WindowState="Hidden"> <ClientEvents Initialize="wbDialogs_Initialize"></ClientEvents> </ig:WebDialogWindow>
function wbDialogs_Initialize(sender, eventArgs) { sender.get_element().style.position = 'static'; }
I tried in many ways, but I couldn't resolve the issue. Can you please help me in this.
One more issue. I am calling one more dialogwindow from child WebDailogWindow. Here also same issue. Dislpaying inside the 1st Child WebDailogWindow
Thank you.
Hi InfraOracle,
You did not discribe what kind of problem you have.I tired to add a button to tab and show dialog on its click. Dialog appeared on top of tab, which is expected.
Notes:1. It is advisable to use top level containers as parent of WebDialogWindow, but not nested complex layout-parents such as WebTab. The UseBodyAsParent have some restrictions.2. Modal dialog may be used only when its parent is the top-container such a <form>. To avoid problems with rendering on the top, the WebDialogWindow should be located as the last child in <form>/webform/masterpage.
Thank you for your reply.
My project has left, top and center frames. In center frame I have placed WebTab, each tab calls its own .aspx page. In .aspx page, I have grid and WebDialogWindow. I am calling this WebDailogWindow on Click event. When I click on button I am calling WebDialogWindow with the below code.
<form id="form1" runat="server"> <ig:WebScriptManager ID="WebScriptManager1" runat="server"> </ig:WebScriptManager> <ig:WebDialogWindow ID="wbPopUp" runat="server" Height="90%" Width="90%" UseBodyAsParent="true" Modal="true" InitialLocation="Centered" Moveable="true" WindowState="Hidden"> <ClientEvents Initialize="wbPopUp_Initialize"></ClientEvents> </ig:WebDialogWindow>
JavaScript
function Open_Edit(iddeal, agtype, dealtype, preview, version) { var dialog = $find('wbPopUp'); dialog.get_contentPane().set_contentUrl('Sample1.aspx"); dialog.set_windowState($IG.DialogWindowState.Normal); dialog.show(); return false; } function wbPopUp_Initialize(sender, eventArgs) { sender.get_element().style.position = 'static'; }
<input id="btnEdit" type="button" value="Edit" onclick="return Open_Edit()/>
Issue 1: WebDialogWindow displaying inside the WebTab. Since I placed WebDailogWindow inside the form.
Issue 2: I am able to access parent form controls when WebDialogWindow Opened.
I am unable to attach my project, because this project is database driven. I hope I answered you in best way.
Thank you
Last time I mistyped "tried" as "tired", sorry for that.
Thanks for description of your application.Please keep in mind that, when ContentUrl is used, then WebTab creates <iframe> for content of that tab-item. That means that content of tab-item is rendered inside of <iframe>, which is a separate window with its own document, form, etc. It is not possible to show content of that iframe-window outside of its bounds. That is just a rule of a browser.
If you want to show html-element (or control like WebDialogWindow) outside of <iframe>, then you should move that element/control into container of that <iframe>. In your case you should move WebDialogWindow into form where WebTab is located.
Sure application will not able to get references of child-controls located in a child-iframe from main page on server. Though, it is possible to do that on client. For example, if you have a button inside of your child-aspx, then you may access main parent window and all its objects including WebDialogWindow located in main form/window. Similar access of children in iframe is possible from main window. Basically all logic related to cross access between all controls/elements in main and child iframes, should be implemented within javascript only. Similar features are not available on server. Below is example to find and open WebDialogWindow, located in main page from a button click located in tab-item ContentUrl (your original button):
<script type="text/javascript">function Open_Edit() { var win = window.parent; var dialog = win.$find('wbDialog'); dialog.show();}</script>
Once again thank you very much for your time. I tried, but I couldn't resolve. I created sample project and attached with this email. I hope you can get better idea what exactly I am trying to achieve. Can you please review and let me know what properties I am missing?.
That example is showing my requirements. My project is completely depending on this.
I am able to click tab items and lift links when popups opened and every popup displaying inside the parent form. It is opening as a popup not as a Dialog window.
Thanks for attachement. I was able to compile and run attached project.
Though, it was not clear what it should do. I set the CenterForm as start-up page. The button in tab item opened dialog inside of iframe assigned by ContentUrl property. That is correct behavior.
If you want dialog to appear outside of WebTab, then, as I said before, you should move wbOrderEntry from OrderForm.aspx into CenterForm.aspx and use codes which I provided.
If your application should do something else (or do not show dialog outside of WebTab), then please explain exactly what you need to achive.
Thank you for your reply. I forgot to mention which is the start up page from sample project. The start up page is MainForm.aspx.
As per your explanation, I can open WebDialogWindow on top of tab control without ContentURL. But for my requirement, I need to open new .aspx as a Modal dailog and need to send some set of parameter to modal dialog from parent form.