Modal Dialog appearing behind parent RadWindow

43 posts, 0 answers
  1. medialog
    medialog avatar
    25 posts
    Member since:
    Sep 2010

    Posted 02 Mar 2011 Link to this post

    Hello When I Build my rad windows on main radwindow when I click a lot of time on the button for open them i have ModalDialog which appearing behing the parent Window.

    I have tried to call the ShowDialog of radwindows with Dispatcher.BeginInvoke but it doesn't works for me....

    Someone have an idea for help me??
  2. medialog
    medialog avatar
    25 posts
    Member since:
    Sep 2010

    Posted 02 Mar 2011 Link to this post

    Hello I  specify the owner of the RadWindows, but it also doesn't work. :(

  3. tungnt185
    tungnt185 avatar
    40 posts
    Member since:
    Aug 2009

    Posted 04 Mar 2011 Link to this post

    Hi guy,

    I'm facing the same problem here.
    And I don't know what's exactly problem.
    This question is for the Telerik team :)

    Regards.
  4. Veda
    Veda avatar
    18 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    Hi,
    I have a requirement where i have to close the dialog window on button click. I'm loading the user control on dialog window and button lies in user control. So in user control i will not have the dialog window object. how can i close the dialog window ?


    TIA

    Regards,
    Veda
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 May 2011 Link to this post

    Hello,

    Veda, you could set the Command property of the button to telerik:WindowCommands.Close - this will tell the window to close when the button is clicked.

    Jérôme and Taufik, we are aware of this problem - does it happen when you click the button very fast? If this is the case you could track the progress of the issue using PITS item ID 2923. We are planning to target such issues for Q2 2011.

    Regards,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. medialog
    medialog avatar
    25 posts
    Member since:
    Sep 2010

    Posted 26 May 2011 Link to this post

    Yes it happen when we click on the button very fast.
    I have fix the problem with doesn't use the radwindows in this context. :)

    Thanks for the fix.
  7. Hrushikesh
    Hrushikesh avatar
    33 posts
    Member since:
    Sep 2010

    Posted 29 Sep 2011 Link to this post

    This is not resolved in th latest one also. Still going behind the parent window.
  8. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 Sep 2011 Link to this post

    Hi Hrushikesh,

    We did a lot of changes and fixed to the RadWindow control and currently we are not able to reproduce this problem. Could you please give us some more details about the scenario you have and if you could send us a sample project that reproduces the issue this would be of great help?

    Regards,
    Miroslav Nedyalkov
    the Telerik team

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

  9. Raphael
    Raphael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 10 Oct 2011 Link to this post

    Hi,

    I have the same problem today with v2011.2.920.1040
    I have a button into my first radwindow which opens (through a delegatecommand) another radwindow.
    If I click several times on the button, child windows open behind my first parent window.

    Do you plan to correct this problem ?

    Raphael


  10. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 13 Oct 2011 Link to this post

    Hello Raphael,

    We tested the issue but with no success. I have attached the project I tested with. Could you please take a look and tell me if you are doing something different or you can send me a sample code/project where We can reproduce the bad behavior.

    Greetings,
    Boyan
    the Telerik team

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

  11. Raphael
    Raphael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 14 Oct 2011 Link to this post

    Hi Boyan,

    Indeed, in your sample it is not reproductible but with a few modifications it is :
    * First, resize your MyWindow and the button into your xaml :

    <telerik:RadWindow x:Class="WindowsOpenedWithCommand.MyWindow"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Width="300" Height="300"
        xmlns:local="clr-namespace:WindowsOpenedWithCommand" WindowStartupLocation="CenterScreen">
         
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadButton x:Name="buton1"  Height="50" Width="100" Content="Open modal window" Command="local:MyCommand.OpenWindow"/>
        </Grid>
    </telerik:RadWindow>

    * Then, Add a little sleep before opening window to simulate a little normal treatment we can have on a real application (myWindow.xaml.cs)

    public partial class MyWindow : RadWindow
        {
            public MyWindow()
            {
     
                CommandManager.SetCommandBindings(this, new CommandBindingCollection()
                {
                    new CommandBinding(MyCommand.OpenWindow, Command_Executed, Command_CanExecute),
                });
                InitializeComponent();
            }
     
            private void Command_Executed(object sender, ExecutedRoutedEventArgs e)
            {
                System.Threading.Thread.Sleep(200);
                new RadWindow { Height = 200, Width = 200, WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen }.ShowDialog();
     
            }
     
            private void Command_CanExecute(object sender, CanExecuteRoutedEventArgs e)
            {
                e.CanExecute = true;
            }
     
     
            public static class MyCommand
            {
                public static ICommand OpenWindow { get; private set; }
     
                static MyCommand()
                {
                    OpenWindow = new RoutedUICommand("My Action", "OpenWindow", typeof(MyCommand));
                }
            }
     
        }


    * Finally, to reproduce you have to click fast (as a double click) one time into the button and the second time near of the button into the background of the window : the second window opens behind the first (picture is the result)


    Raphael.






  12. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 18 Oct 2011 Link to this post

    Hello Raphael,

    Could you please try to show the window in a Dispatcher. Use the following code:
    Dispatcher.BeginInvoke(() => win.ShowDialog());
    Showing the RadWindow asynchronously should fix the problem for you.

    Best wishes,
    Boyan
    the Telerik team

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

  13. Raphael
    Raphael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 18 Oct 2011 Link to this post

    Hi,

    I tried your code without success
    System.Threading.Thread.Sleep(200);
    RadWindow win = new RadWindow { Height = 200, Width = 200, WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen };
    Dispatcher.BeginInvoke(() => win.ShowDialog());

    The second window still appears behind the first.
     You could test it before telling me to test it as I provided to you the code to reproduce and the scenario...



  14. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 21 Oct 2011 Link to this post

    Hello Raphael,

    I am sorry for your frustration. I tested the proposed solution and it was working fine at my side. Maybe the problem have been that I have not clicked fast enough or you are testing it in a real scenario that differs in some way from simply sleeping the thread. We already have bug logged for this issue. You can follow its progress here. I will increase the priority of the item, however I doubt that it will make it for Q3. And more realistic target is the service pack.

    As a workaround you can also try to perform the operations you are doing in Dispatcher. This worked  on my machine with Thread.Sleep(200).

    Please, excuse us again for the inconvenience.  Don't hesitate to contact us if you have other questions.


    Best wishes,
    Boyan
    the Telerik team

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

  15. Raphael
    Raphael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 21 Oct 2011 Link to this post

    Boyan,

    The scenario to reproduce was your sample project with the modifications I described previously. The capture i provided proved it was your sample and not a different project...
    I voted for the issue but it was created more than 6 months ago and not scheduled so I think i am going to be patient...
    For the workaround with the Dispatcher, in my real project, the operations are asynchronous wcf treatments so...

    Thanks for answers

    Raph

  16. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 26 Oct 2011 Link to this post

    Hi Raphael,

    Could you please try another possible workaround. Try setting the following line to the ModalWindow:
    win1.IsTopmost = true;
    This worked on the sample project, hopefully is will work on your project as well.

    Greetings,
    Boyan
    the Telerik team

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

  17. Raphael
    Raphael avatar
    15 posts
    Member since:
    Jan 2011

    Posted 27 Oct 2011 Link to this post

    Hi Boyan,

    Thank you for your reply. This new property which did not exists into the version 2010.3 but which exists into the version 2011.2 works.
    The second radwindow does not appear behind the first anymore even if I click 10 times fastly.

    Thank you for this workaround, you can indicate it into the issue 2923...

    Raphael
  18. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 27 Oct 2011 Link to this post

    Hello Raphael,

    I am glad this worked for you. I have updated the Pits item so this can help other users as well and also sorry again for the caused inconvenience. We will try to fix this in our code as well most probably for the service pack of Q3.

    Regards,
    Boyan
    the Telerik team

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

  19. Nathaniel
    Nathaniel avatar
    68 posts
    Member since:
    Nov 2010

    Posted 28 Oct 2011 Link to this post

    What would we use for the 3 pre-defined radwindows (Alert, Confirm, Prompt).  I have a Confirm which is popping up behind one of my other Radwindows.
  20. Nathaniel
    Nathaniel avatar
    68 posts
    Member since:
    Nov 2010

    Posted 28 Oct 2011 Link to this post

    Also the spellchecker control pops up behind child windows.
  21. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 02 Nov 2011 Link to this post

    Hi Nathaniel,

    You can set the IsTopMost property to predefined dialogs from the style. Declare WindowStyle in the DialogParameters and set the property there.

    All the best,
    Boyan
    the Telerik team

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

  22. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 02 Nov 2011 Link to this post

    @Boyan: That does not work for the spell checker. IsTopMost works well in some scenarios, definitely for straight-up alert and confirm dialogs. But for RadSpellChecker it does not since there is no way to set the style of the dialog windows. See this thread:
    http://www.telerik.com/community/forums/silverlight/spellchecker/setting-the-style-of-the-dialog-windows.aspx
  23. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 07 Nov 2011 Link to this post

    Hi Hwsoderlund,

    You are right that this doesn't work for the RadSpellChecker in the moment, but we will fix this by adding the property in the constructor or  will expose the style as they said in the other theme.

    Greetings,
    Boyan
    the Telerik team

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

  24. Edvin
    Edvin avatar
    16 posts
    Member since:
    Aug 2007

    Posted 22 Nov 2011 Link to this post

    I just switch to 2011_3_1116 (before I have 2010.3) and I run into this problem.  It is very annoying and in complex application it is almost impossible to solve with IsTopMost, because you don't know exactly which window will be topmost. And setting IsTopMost to all doesn't works, works only if I set IsTopMost to the window where I found a problem.

     

    Typically this happens when error or confirm dialog is shown as http response from server. And because it is shown at the back, user have no clue what happens. I have made quite a lot of changes with your last version, but now I'm not able to use it. Can you please give some info when this will be corrected or I will have to switch to old version.

     

    best regards
    edvin

  25. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 28 Nov 2011 Link to this post

    Hi Edvin,

    We are currently investigating this issue. As soon as we finish I will write here to inform you what we found.

    Kind regards,
    Ivo
    the Telerik team

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

  26. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 06 Dec 2011 Link to this post

    I have a RadWindow with a button that opens a FileDialog and the following code(behind) reproduces this behaviour:

    Dim _dlg As New OpenFileDialog With {.Filter = "All files (*.*)|*.*", .Multiselect = True}
     
    If _dlg.ShowDialog = True Then
       Dim _win As New custom_upload_window(_dlg.Files, Me.ParentOfType(Of RadWindow))
       _win.ShowDialog()
    End If

     

    Click the button and the FileDialog opens, select some files and press OK, custom_upload_window opens behind it's parent window.
    I have worked around this with the IsTopmost property, but it's still an issue in some cases I guess.

    (custom_upload_window set Owner property (second parameter))

  27. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 06 Dec 2011 Link to this post

    /* deleted - got an internal server error when posting */
  28. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 06 Dec 2011 Link to this post

    /* deleted - got an internal server error when posting */
  29. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 09 Dec 2011 Link to this post

    Hi,

    We will do our best a fix for this issue to be included for one of the upcoming releases.

    Kind regards,
    Ivo
    the Telerik team

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

  30. Aziz
    Aziz avatar
    32 posts
    Member since:
    Sep 2011

    Posted 20 Apr 2012 Link to this post

    I get the same issue with the scheduleview control.

    if you click on a portion of my program a new window opens with the schedule view. I find ocasional the dialog prompts such as do i want to delete a series or individual appointment get pushed behind the window that contains my schedule view. It sounds like you need to insure that all your dialog prompt windows are set to topmost as i see now way for me to set that.
Back to Top