This is a migrated thread and some comments may be shown as answers.
Restricting focus to specific dock window
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 26 Jul 2018, 05:16 PM

Hi,

The scenario is following

The system has 2 different windows (type floating.).

Say user is doing something like editing in a first window.

I want programatically to restrict user to the window he is currently working in, until he commits his work.

I.e. prevent him to go to window #2 until he clicks save - so it should work as a modal dialog box while user in editing mode.

I tried to hook up to ActiveWindowChanging event of RadDock class. 

I wrote essentially 

private void DockerContainer_ActiveWindowChanging(object sender, DockWindowCancelEventArgs e)
{
            // some processng
           if (needTo capture)
           {
                e.Cancel = true;
            }
}

But it doesn't work.

Are there any way to do what i want to do?

Please help,

Boris Pitel

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Jul 2018, 12:23 PM
Hello, Boris,    

When you cancel the RadDock.ActiveWindowChanging event, the FloatingWindow is actually not set as ActiveWindow. However, since the FloatingWindow is a derivative of RadForm, it is being activated before the ActiveWindowChanging is even fired. The suitable approach for handling such cases is to use the respective validating events of the controls you have on the FloatingWindow and thus ensure that the input data is valid. Thus, it won't be necessary to block the activated form until the user enters valid data.

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Dock
Asked by
Boris
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or