Mar 06, 2014, 11:33 AM
[CLOSED] Load Window from UserControlLoader in Panel
Hi there,
I am currently facing a problem with launching a Window from within a UserControl that is loaded inside of a Panel.
Basically the structure is that I have a GroupTabPanel with three Panels as the groups. Each Panel has multiple Items that are UserControlLoader. Inside of the UserControls are the GridPanel that I want to display in each GroupTabPanel Section.
This is identical to the example listed here https://examples2.ext.net/#/TabPanel...anel/Overview/
When I try to open the Window it throws a JavaScript error Uncaught TypeError: Cannot call method 'getViewRegion' of undefined
Also the Window appears aligned to the top left browser window corner, is not draggable and the Toolbar of the GripView also loaded from the UserControl overlays the Window. Very weird.
editUser.ascx looks like this
I am guessing I have to set the renderTo Property to the Viewport or something like that. But how would I do that?
Thank you for any help,
Thomas
I am currently facing a problem with launching a Window from within a UserControl that is loaded inside of a Panel.
Basically the structure is that I have a GroupTabPanel with three Panels as the groups. Each Panel has multiple Items that are UserControlLoader. Inside of the UserControls are the GridPanel that I want to display in each GroupTabPanel Section.
This is identical to the example listed here https://examples2.ext.net/#/TabPanel...anel/Overview/
<ext:Viewport runat="server" Layout="Border" ID="TheViewport">
<Items>
<ext:GroupTabPanel runat="server" region="Center" ID="GroupPanel" >
<Items>
<ext:Panel runat="server" ID="Group_0">
<Items>
<ext:UserControlLoader runat="server" Path="editUser.ascx" UserControlID="editUser"></ext:UserControlLoader>
</Items>
</ext:Panel>
</Items>
</ext:GroupTabPanel>
</Item>
</ext:Viewport>
My question is: how can I open a Window Element from within one of these UserControls, that are loaded inside the Panels that represent the GroupTabPanel groups? When I try to open the Window it throws a JavaScript error Uncaught TypeError: Cannot call method 'getViewRegion' of undefined
Also the Window appears aligned to the top left browser window corner, is not draggable and the Toolbar of the GripView also loaded from the UserControl overlays the Window. Very weird.
editUser.ascx looks like this
<ext:Window runat="server" ID="NewBoxWindow" Icon="TransmitAdd" Title="Neue Box anlegen" Width="460" Height="600" Hidden="true">
<Items>
...
</Items>
</ext:Window>
I am guessing I have to set the renderTo Property to the Viewport or something like that. But how would I do that?
Thank you for any help,
Thomas
Last edited by Daniil; Mar 14, 2014 at 8:27 AM.
Reason: [CLOSED]