Problem on raising DirectEvent on DesktopModuleProxy Window parameter

  1. #1

    Problem on raising DirectEvent on DesktopModuleProxy Window parameter

    Hi there!
    There is a problem on raising DirectEvent on DesktopModuleProxy Window prioperty. When I set a window in Window tag of DesktopModuleProxy and setting a SplitButton (inserted in Items of a toolbar object) DirectEvent (Click event) to execute, ResourceManager could not found SplitButton object that is embedded in my Toolbar object of my window. It will return "The control with ID 'ButtonHelp' not found" error. How can I solve it? I changed IDMode of my SplitButton object to anything but nothing changed!!!

    My control code is

    <ext:SplitButton ID="ButtonHelp" Text="Help" runat="server" Icon="Help" ToolTip="Show help of current view." Scale="Large" RowSpan="3" IconAlign="Top" ArrowAlign="Right">
        <ext:Menu runat="server" ID="HelpMenu">
                <ext:MenuItem ID="MenuItemAboutDiten" runat="server" Text="About DITeN framework" Icon="Information" ToolTip="Show information about DITeN.">
                        <Click OnEvent="MenuItemAboutDiten_Click"></Click>
        <Click OnEvent="ButtonHelp_Click">
            <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="ContentPanel" Msg="Show help" />
                <ext:Parameter Name="HelpID" Value="Diten.Web.UI.WebControls.SystemControls.Explorer" Mode="Value" />
    My code behind is

    protected void ButtonHelp_Click(object sender, DirectEventArgs e)
        HelpWindow.HelpId = e.ExtraParams["HelpId"];
    And finally, why when I use KeyMap object in content tag of my ButtonGroup object, the Window object of DesktopModuleProxy will not be appeared in my Desktop control?!?

    My code is

    <ext:ButtonGroup ID="ButtonGroupSelect" runat="server" Title="Select" Columns="1">
        <ext:KeyMap runat="server" Target="#{ContentPanel}">
                    <ext:KeyBinding Ctrl="True" Handler="#{StatsButtonSelectAll}.fireEvent('click');">
                            <ext:Key Code="A" />
            <ext:Button ID="StatsButtonSelectAll" runat="server" Text="Select all" ToolTip="Select all items in this view. (Ctrl+A)" OnDirectClick="ButtonSelectAll_Click" />
            <ext:Button ID="StatsButtonSelectNone" runat="server" Text="Select none" ToolTip="Clear all your selections." OnDirectClick="ButtonSelectNone_Click" />
            <ext:Button ID="StatsButtonInvertSelection" runat="server" Text="Invert selection" ToolTip="Reverse the CURRENT SELECTION." OnDirectClick="ButtonInvertSelection_Click" />
    Click image for larger version. 

Name:	2017-10-31 (1).jpg 
Views:	2 
Size:	97.1 KB 
ID:	25069
    Last edited by ArashRahimian; Nov 03, 2017 at 5:26 AM.
  2. #2

    Base of problem

    In previous version of Ext.Net I used Desktop.Module.Add method and it was working fine but in this version (4.5) this method is not working for adding modules to desktop control.
    Last edited by ArashRahimian; Nov 14, 2017 at 11:54 AM.
  3. #3

    Source of the problem

    I think base of the problem is ResourceManager. It can not find objects that has DirecEvents like Click. When I put a simple button in WhatsNew.ascx control of Desktop control sample of Ext.Net and set Click DirectEvent this error will be raised after click on button.

    Click image for larger version. 

Name:	2017-11-14.jpg 
Views:	2 
Size:	104.7 KB 
ID:	25075

    I think (maybe) in this part of code of ResourceManage.RaisePostBackEvent, Page is null.
    if (!flag1)
        if (configID == "-")
            ctrl = !flag2 ? (Control)this : (Control)this.Page;
            ctrl = Ext.Net.ResourceManager.FindControlByConfigID((Control)this.Page, configID, true, (Control)null);
            if (ctrl == null)
    throw new HttpException("The control with ID '{0}' not found".FormatWith((object)configID));
    Attached Thumbnails Click image for larger version. 

Name:	Ext.Net.0001.jpg 
Views:	2 
Size:	100.2 KB 
ID:	25074  
    Last edited by ArashRahimian; Nov 14, 2017 at 12:07 PM.
  4. #4

    After some experiment

    When I use this tag for registering mi control every thing is fine.

    <%@ Register Src="modules/WhatsNew.ascx" TagPrefix="mod" TagName="WhatsNew" %>
    But when I use this method for registering my control dynamically this error will be raised on my WhatsNew.ascx test button click direct event.

    var appHolder = LoadControl("~/modules/WhatsNew.ascx");
    var desktopModuleProxy = ControlUtils.FindControl<DesktopModuleProxy>(appHolder);
    if (desktopModuleProxy != null)
    Last edited by ArashRahimian; Nov 15, 2017 at 6:21 AM.

Similar Threads

  1. Replies: 3
    Last Post: Sep 26, 2013, 2:36 PM
  2. Replies: 0
    Last Post: May 26, 2013, 3:17 PM
  3. Problem in raising direct methods in usercontrol
    By in forum 2.x Help
    Replies: 5
    Last Post: Nov 15, 2012, 11:31 PM
  4. MVC Razor PartialViews with DesktopModuleProxy
    By markusn in forum 2.x Help
    Replies: 1
    Last Post: Nov 04, 2012, 3:27 PM
  5. [CLOSED] DateTime parameter on DirectEvent
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 17, 2010, 4:12 PM

Posting Permissions