This is a migrated thread and some comments may be shown as answers.

Modal Dialog appearing behind parent RadWindow

42 Answers 1051 Views
Window
This is a migrated thread and some comments may be shown as answers.
medialog
Top achievements
Rank 2
medialog asked on 02 Mar 2011, 06:57 PM
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??

42 Answers, 1 is accepted

Sort by
0
medialog
Top achievements
Rank 2
answered on 02 Mar 2011, 07:30 PM
Hello I  specify the owner of the RadWindows, but it also doesn't work. :(

0
tungnt185
Top achievements
Rank 2
answered on 04 Mar 2011, 04:35 PM
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.
0
Veda
Top achievements
Rank 1
answered on 24 May 2011, 07:13 AM
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
0
Miroslav Nedyalkov
Telerik team
answered on 26 May 2011, 10:12 AM
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
0
medialog
Top achievements
Rank 2
answered on 26 May 2011, 01:05 PM
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.
0
Hrushikesh
Top achievements
Rank 1
answered on 29 Sep 2011, 07:11 PM
This is not resolved in th latest one also. Still going behind the parent window.
0
Miroslav Nedyalkov
Telerik team
answered on 30 Sep 2011, 08:00 AM
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 >>

0
Raphael
Top achievements
Rank 1
answered on 10 Oct 2011, 10:19 AM
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


0
Boyan
Telerik team
answered on 14 Oct 2011, 02:31 AM
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 >>

0
Raphael
Top achievements
Rank 1
answered on 14 Oct 2011, 11:00 AM
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.






0
Boyan
Telerik team
answered on 18 Oct 2011, 01:23 PM
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 >>

0
Raphael
Top achievements
Rank 1
answered on 18 Oct 2011, 02:34 PM
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...



0
Boyan
Telerik team
answered on 21 Oct 2011, 03:16 PM
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 >>

0
Raphael
Top achievements
Rank 1
answered on 21 Oct 2011, 03:33 PM
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

0
Boyan
Telerik team
answered on 26 Oct 2011, 04:53 PM
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 >>

0
Raphael
Top achievements
Rank 1
answered on 27 Oct 2011, 01:50 PM
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
0
Boyan
Telerik team
answered on 27 Oct 2011, 04:46 PM
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 >>

0
Nathaniel
Top achievements
Rank 1
answered on 28 Oct 2011, 01:44 PM
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.
0
Nathaniel
Top achievements
Rank 1
answered on 28 Oct 2011, 03:01 PM
Also the spellchecker control pops up behind child windows.
0
Boyan
Telerik team
answered on 02 Nov 2011, 10:42 AM
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 >>

0
hwsoderlund
Top achievements
Rank 1
answered on 02 Nov 2011, 04:25 PM
@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
0
Boyan
Telerik team
answered on 07 Nov 2011, 03:55 PM
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 >>

0
Edvin
Top achievements
Rank 1
answered on 22 Nov 2011, 02:42 PM

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

0
Ivo
Telerik team
answered on 28 Nov 2011, 09:10 AM
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 >>

0
Trude
Top achievements
Rank 2
answered on 06 Dec 2011, 10:07 AM

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))

0
Trude
Top achievements
Rank 2
answered on 06 Dec 2011, 10:07 AM
/* deleted - got an internal server error when posting */
0
Trude
Top achievements
Rank 2
answered on 06 Dec 2011, 10:08 AM
/* deleted - got an internal server error when posting */
0
Ivo
Telerik team
answered on 09 Dec 2011, 10:37 AM
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 >>

0
Aziz
Top achievements
Rank 1
answered on 20 Apr 2012, 07:51 PM
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.
0
Boyan
Telerik team
answered on 25 Apr 2012, 03:46 PM
Hi Jacob,

This is because of the fact that RadScheduleView is taking the focus after the window has been shown. This can be easily fixed by using the IsTopmost property of RadWindow and set it to true.However we don't want to include such fix in the code as it may result in some other problems. We will investigate if we can change the sequence events are invoked so this scenario is working properly. I have logged it in our PITS where you can follow the item's progress.

For now as a workaround you can easily set the IsTopMost property to these modal windows by using ScheduleViewDialogFactory. I have attached a simple project how this can be achieved. This should solve your problems.

Kind regards,
Boyan
the Telerik team

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

0
Nathaniel
Top achievements
Rank 1
answered on 19 Dec 2012, 07:48 PM
Has the problem where the spellchecker control pops up behind child windows been fixed?
0
Boyan
Telerik team
answered on 20 Dec 2012, 02:18 PM
Hi Nathaniel,

Are you using the latest version of our controls as this issue should be fixed. And also could you confirm that that you are talking about Silverlight platform or you are using WPF.

Regards,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nathaniel
Top achievements
Rank 1
answered on 02 Jan 2013, 01:52 PM
I'm using the latest silverlight version 2012.3.1129.1050, and the problem still exists.
0
Iva Toteva
Telerik team
answered on 03 Jan 2013, 12:11 PM
Hi Nathaniel,

The SpellChecker uses a non-modal RadWindow when spell-checking WordByWord. When the spell-checked control is in a modal RadWindow, it can indeed happen that the spell-check window appears behind the parent window. This is so because normally non-modal windows should not be opened from modal ones.

However, as we agree that this is not the expected behavior no matter what the reason is, we have fixed the issue with RadSpellChecker and the change will be visible in the internal build next week.

Please, excuse us for the inconvenience.

Kind regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
nyi nyi
Top achievements
Rank 1
answered on 21 Feb 2013, 02:52 AM
Hi,

I would like to know that If the problem of RadSpellchecker control popping  up behind child windows been fixed?

Regards,
Nyi Nyi
0
Vasil
Telerik team
answered on 25 Feb 2013, 11:49 AM
Hello,

The problem that spell-check window appears behind the parent window when the spell-checked control is positioned in RadWindow is resolved with the latest official 2013 Q1 (2013.1.220) version of RadControls for Silverlight.

Don't hesitate to contact us if you have other questions.

Regards,
Vasil
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nathaniel
Top achievements
Rank 1
answered on 06 Jan 2014, 09:13 PM
There is another related bug.  The little window with the Yellow triangle with the text " The spelling check is complete." is still popping up behind child windows.
0
Vasil
Telerik team
answered on 09 Jan 2014, 05:09 PM
Hi Nathaniel,

Unfortunately, we are not aware and were unable to reproduce such issue using our latest official 2013 Q3 SP1 (2013.3.1204). Could you please elaborate the exact version as well as the concrete scenario you are observing this problem?

Looking forward to your reply.

Regards,
Vasil
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Nathaniel
Top achievements
Rank 1
answered on 10 Jan 2014, 05:59 PM
I'm using 2013 Q3 SP1 (2013.3.1204).

My scenario is this

I have a child window, which opens a 2nd child window. From the 2nd child window i open the spellchecker.  Sometime the "Completed" popup appears behind the 2nd child window. 
0
Svetoslav
Telerik team
answered on 15 Jan 2014, 04:17 PM
Hello Nathaniel,

Thank you for getting back to us!

Unfortunately our attempts to reproduce this issue were not successfully again. I have prepared an example which demonstrates two scenarios, please find it attached. The first scenario uses Silverlight Child Window and the second one RadWindow. We would appreciate if you can tell us the differences between the sample and your project or open a support ticket and send us your project so that we can troubleshoot it on our end.

Let us know how it goes.

Regards,
Svetoslav
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Nathaniel
Top achievements
Rank 1
answered on 15 Jan 2014, 07:20 PM
Do you have a different format than a .rar.

I mis spoke on my previous post.  All my windows were RadWindows.  No Silverlight Child Windows.



0
Svetoslav
Telerik team
answered on 16 Jan 2014, 08:40 AM
Hi Nathaniel,

I am sorry for the inconvenience, it was my mistake. Please find the attached demo project in zip format.

If you have any further questions don't hesitate to contact us again! 

Regards,
Svetoslav
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Window
Asked by
medialog
Top achievements
Rank 2
Answers by
medialog
Top achievements
Rank 2
tungnt185
Top achievements
Rank 2
Veda
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Hrushikesh
Top achievements
Rank 1
Raphael
Top achievements
Rank 1
Boyan
Telerik team
Nathaniel
Top achievements
Rank 1
hwsoderlund
Top achievements
Rank 1
Edvin
Top achievements
Rank 1
Ivo
Telerik team
Trude
Top achievements
Rank 2
Aziz
Top achievements
Rank 1
Iva Toteva
Telerik team
nyi nyi
Top achievements
Rank 1
Vasil
Telerik team
Svetoslav
Telerik team
Share this question
or