RadButton Click event not always fired

6 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 03 Oct 2011 Link to this post

    Hi,

    This button click event failure is happening with many of my modal radwindows's but I explain a representative example.

    I press a Menu Button ("Sign On") which brings up a RadWindow where the user may enter thre user id and password.  If the user presses cancel the RadWindow is closed (window.Closed()) and disappears properly.    I then press the sign on button again and nothing happens.  I click it again and the RadWindow appears.  An interesting point is that if I address stop on the click event the RadWindow will appear on the first click. 

    This also happens on RadButton clicks where the button is on the RadWindow form.  In many instances more than two clicks are required.  I also tried modeless windows but have the same problem.

    It is almost like these windows are not actually be cleared out?

    Thanks
    Rich

    <telerik:RadMenu Name="radMenu" Grid.Row="0" HorizontalAlignment="Right" >
                <telerik:RadMenuItem Name="menuSignOn"
                                     Header="Sign On"
                                     Click="menu_Click">
                </telerik:RadMenuItem>
            </telerik:RadMenu>
     
     
    ----- Create Window ------
     
    #region SignOn
     
                if (((RadMenuItem)source).Name == "menuSignOn")
                {
                    String tabName = ((RadMenuItem)source).Header as String;
                    if (tabName == "Sign On")
                    {
                        this.signOnWindow.Content = new SignOn();
                        this.signOnWindow.Tag = this;
                        this.signOnWindow.Height = 200;
                        this.signOnWindow.Width = 325;
                        this.signOnWindow.Header = "Sign On";
                        this.signOnWindow.ResizeMode = ResizeMode.NoResize;
                        this.signOnWindow.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                        this.signOnWindow.ShowDialog();
                    }
                    else
                    {
                        RadMenuItem subMenu = SetMenuItem(this.radMenu, "menuFile", false);
                        subMenu = SetMenuItem(this.radMenu, "menuExecute", false);
                        subMenu = SetMenuItem(this.radMenu, "menuDesignMode", false);
                        subMenu = SetMenuItem(this.radMenu, "menuSignOn", true);
                        subMenu.Header = "Sign On";
                    }
                }
     
                #endregion SignOn
     
     
    ---- Close RadWindow ----
     
     
     private void btnConnect_Click(object sender, RoutedEventArgs e)
            {
                // Put in code to call server to validate user
     
                RadWindow window = RadWindow.GetParentRadWindow(this);
                window.DialogResult = true;
                window.Close();
            }
     
            private void btnCancel_Click(object sender, RoutedEventArgs e)
            {
                RadWindow window = RadWindow.GetParentRadWindow(this);
                window.DialogResult = false;
                window.Close();
            }
     
     
    --- Callback ----
     
     #region signOnWindow_Closed
     
            void SignOnWindow_Closed(object sender, WindowClosedEventArgs e)
            {
                if (e.DialogResult == null)
                    return;
                RadMenuItem subMenu = SetMenuItem(this.radMenu, "menuFile", true);
                SetSubMenuItem(subMenu, "menuSave", false);
                SetSubMenuItem(subMenu, "menuSaveAs", false);
                SetSubMenuItem(subMenu, "menuClose", false);
                SetSubMenuItem(subMenu, "menuExport", false);
                subMenu = SetMenuItem(this.radMenu, "menuExecute", false);
                subMenu = SetMenuItem(this.radMenu, "menuDesignMode", false);
                subMenu = SetMenuItem(this.radMenu, "menuSignOn", true);
                subMenu.Header = "Sign Off";
            }
     
    #endregion signOnWindow_Closed

     
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 05 Oct 2011 Link to this post

    Hi Richard Harrigan,

    I tried to reproduced this issue, using the mentioned scenario without any success. I have attached a sample project. We want to investigate this, so it would be great if you modify it and resend it back to us.

    Also when using multiple regular RadWindows (non-modal) it is expected the first click not to fire the RadButton's event. We use Popup to display the RadWindow. So when two or more RadWindows are displayed at the same time, the first click will focus the RadWindow and the second will fire the RadButton's event. 

    Regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 05 Oct 2011 Link to this post

    Hi,

    I tested your program and experienced the same problem.  However in the xaml you had GotFocus="RadWindow_GotFocus" which did not compile?  I assume this is needed to make your example work.  Please explain.


    Thanks
    Rich
  5. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 06 Oct 2011 Link to this post

    Hi Richard Harrigan,

    The RadWindow_GotFocus is there, because I made some tests, and I forgot to remove it. Could you please create a short movie demonstrating the issue you are experiencing and send it to us into a support ticket?

    Regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 06 Oct 2011 Link to this post

    Hi,

    I re-tested your example but this time instead of using the mouse I used the space bar to click a button.in the RadWindow.  I could not make it fail and when I retried the mouse again I got intermittant failures.  Have you ever heard of this kind of problem with a mouse?  I am using a Microsoft "Bluetooth" Notebook Mouse 5000.  I will replace the mouse and retry.
    Thanks

    Rich
  7. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 07 Oct 2011 Link to this post

    Hi Richard Harrigan,

    No, we are not aware of such a problem using modal Windows. It should not be different with another mouse. Could you please capture a short video and send it to us via a support ticket?

    All the best,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner