Oct 29, 2012, 10:11 AM
[CLOSED] [#23] Page_Load event in UserControl dynamic load with dynamically control in desktop
Hi guys,
I have a Desktop with one module.
If i click on a specific button, i call a direct method function in Desktop.aspx.
this function dynamic load an another module( in autorun = true).
test.ascx use also DevExpress component.
I don't fire Page_Load from this module.
The module is show.
Desktop.aspx
I have a Desktop with one module.
If i click on a specific button, i call a direct method function in Desktop.aspx.
this function dynamic load an another module( in autorun = true).
test.ascx use also DevExpress component.
I don't fire Page_Load from this module.
The module is show.
Desktop.aspx
[DirectMethod]
public void test()
{
_test ucSimpleControl = LoadControl("~test.ascx") as _test;
DesktopModuleProxy control = Ext.Net.Utilities.ControlUtils.FindControl<Ext.Net.DesktopModuleProxy>(ucSimpleControl);
DesktopMain.AddModule(control.Module);
}
Test.ascx<ext:DesktopModuleProxy ID="DesktopModuleProxy1" runat="server">
<Module ModuleID="tab-win" AutoRun="true">
<Shortcut Name="test" />
<Launcher Text="test" />
<Window>
<ext:Window ID="WindowsView" runat="server" Title="View" BodyBorder="1"
DefaultRenderTo="Form" Border="false" AutoScroll="true" Width="700" Height="350"
AutoShow="true" ConstrainHeader="true" Layout="AnchorLayout">
<Items>
<ext:Panel ID="Panel1" runat="server" AnchorHorizontal="100%" AnchorVertical="100%" Resizable="true" >
<Content>
<dx:ASPxGridView ID="Grid" runat="server" Width="100%" DataSourceID="dataSource"
AutoGenerateColumns="False" KeyFieldName="0Id" OnInit="windows_init">
<Columns>
</Columns>
<Settings ShowFilterRow="True" ShowFilterRowMenu="true" ShowVerticalScrollBar="true"
ShowHorizontalScrollBar="true" VerticalScrollBarStyle="Virtual" />
</dx:ASPxGridView>
<asp:SqlDataSource ID="dataSource" runat="server" EnableCaching="true"></asp:SqlDataSource>
</Content>
</ext:Panel>
</Items>
</ext:Window>
</Window>
</Module>
</ext:DesktopModuleProxy>
Test.ascx.csprotected void Page_Load(object sender, EventArgs e)
{
dataSource.ConnectionString = "ConnectionString";
dataSource.SelectCommand = "SELECT * FROM table";
if (!IsPostBack)
{
display();
}
else if (Session["Colonne"] != null) _listeColumn = (List<String>)Session["Colonne"];
}
Regards
Last edited by Daniil; Dec 07, 2012 at 3:13 PM.
Reason: [CLOSED]