Apr 22, 2018, 6:19 PM
Problem on rasing DirectEvent on Desktop control.
Hi Ext
At first thanks so much about Ext components. I'm appreciated.
I'm adding a dynamic module into my desktop control but I have problem on raising DirecEvents. My code is
Error message is "The control with ID 'button-1066' not found".
At first thanks so much about Ext components. I'm appreciated.
I'm adding a dynamic module into my desktop control but I have problem on raising DirecEvents. My code is
[DirectMethod(ShowMask = true)]
public void AddAnotherModule()
{
Desktop.GetInstance().RemoveModule("add1-module");
var win = new Window
{
Title = "Dynamic Window",
Width = 300,
Height = 300,
DefaultRenderTo = Ext.Net.DefaultRenderTo.Form,
Icon = Icon.ApplicationAdd
};
DesktopModule m = new DesktopModule
{
ModuleID = "dyn-mod",
Shortcut = new DesktopShortcut
{
Name = "Dynamic Module"
},
Launcher = new Ext.Net.MenuItem
{
Text = "Dynamic module"
},
Window =
{
win
},
AutoRun = true
};
var btn = new Ext.Net.Button
{
Text = @"DynamiC Button"
};
btn.DirectEvents.Click.Event += OnClick;
m.Window[0].Items.Add(btn);
Desktop1.AddModule(m);
}
protected void OnClick(object sender, DirectEventArgs e)
{
X.Msg.Alert("OnClick", "DirectEventArgs");
}
Why Click event of DirectEvents raising this error and it can not find my Button control?Error message is "The control with ID 'button-1066' not found".
Last edited by ArashRahimian; Apr 22, 2018 at 6:24 PM.