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

How to restrict user to leave a radForm in radDock.

3 Answers 96 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Saad
Top achievements
Rank 1
Saad asked on 15 Mar 2011, 09:00 AM
Hello Everybody,

How to restrict users to leave from one radForm to other before completing a certain process in radDock. I tried to apply some logic on radDock_ActiveWindowChanged event but its not restraining it to change. Following code I wrote in radDock changed event.

((HostWindow)(this.radDock1.DockWindows(radDock1.ActiveWindow.Name + "1"))).Select();    
((DocumentWindow)(this.RadDock1.DockWindows(windowName))).Select();

Thanks,
Saad

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 15 Mar 2011, 10:32 AM
Hello,

This may certainly be posible but if I understand you correctly, you are creating some sort of step-by-step process. If that's the case, then I'm pleased to say that this week, the new Q1 2011 release is due out. This new release contains a brand new control called the RadWizard which is designed to help build step-by-step processes and break down complex tasks into small steps, much like for example an installation wizard. You can find out some more about the new RadWizard at my blog post here.

I hope that this helps, but if you need more information, or if I have misunderstood your requirement, please let me know
Thanks
Richard
0
Saad
Top achievements
Rank 1
answered on 15 Mar 2011, 11:45 AM
Hi Richard,
Thanks for your prompt reply. No its not step by step process. The scenario is I have place add, edit save buttons on toollbar on a radforms in radDock. If add button is clicked the status of this radform is add. Now if there are other radforms opened in the radDock user can click on it without cancelling or completing the add operation. So therefore I want to restrict the user if the form is in add mode than finish or cancel the operation first.
Thanks ,
Saad.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 15 Mar 2011, 12:27 PM
Hello,

There are a few ways to do this. One way might be to disable the other windows whilst in Add mode. For exmaple

private void DisableOtherWindows(DockWindow window)
{
    this.radDock1.ActiveWindow = window;
    foreach (DocumentWindow w in this.radDock1.DockWindows)
    {
        if (w != window)
        {
            w.TabStripItem.Enabled = false;
        }
    }
}
private void EnableWindows()
{
    foreach (DocumentWindow w in this.radDock1.DockWindows)
    {
       w.TabStripItem.Enabled = true;
    }
}

i hope that this helps, but let me know if you need further information
Regards,
Richard
Tags
Dock
Asked by
Saad
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Saad
Top achievements
Rank 1
Share this question
or