How to restrict user to leave a radForm in radDock.

4 posts, 1 answers
  1. Saad
    Saad avatar
    4 posts
    Member since:
    Feb 2011

    Posted 15 Mar 2011 Link to this post

    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

  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Mar 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Saad
    Saad avatar
    4 posts
    Member since:
    Feb 2011

    Posted 15 Mar 2011 Link to this post

    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.
  5. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Mar 2011 Link to this post

    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
Back to Top