Multiple RadWindow in RadTabStrip

3 posts, 1 answers
  1. Kaushal
    Kaushal avatar
    47 posts
    Member since:
    Sep 2010

    Posted 15 Oct 2010 Link to this post

    Hi,

    Here I am facing problem related to RadWindow in RadTabStrip with Contaxt Menu. As I have managed RadWindow Open functionality through code behind on Itemclick of Contaxt menu. On each click of contaxt menu in RadGrid I need to open RadWindow. But here once I open the RadWindow in one Grid through contaxt menu and after closing it when I go for next Tab then last radwindow load automatically.

    This my code how I am managing radwindow thru code behind onItemclick of contaxt menu:

    protected

     

     

    void rcmFormContextMenu_ItemClick(object sender, RadMenuEventArgs e)

     

    {

     

     

    if (rtsEditEntity.SelectedTab.Value == "6")

     

    {

     

     

    int _formId = Convert.ToInt32(hiddenFormId.Value);

     

     

     

    RadWindow rwForm = new RadWindow();

     

    rwForm.ID =

     

    "RadWindow1";

     

     

     

    rwForm.NavigateUrl = "~/FormsViews/EditForm.aspx";

     

    rwForm.VisibleOnPageLoad =

     

    true;

     

    rwForm.Modal =

     

    true;

     

    rwForm.Overlay =

     

    true;

     

    rwForm.Behaviors =

     

    WindowBehaviors.Close;

     

    rwForm.Width = 1000;

    rwForm.Height = 650;

     

     

    if (rwmForm.Windows.Count > 0)

     

    {

    rwmForm.Windows.RemoveAt(0);

    }

    rwmForm.Windows.Add(rwForm);

    }

    }

     

     

    protected void rcmViewContextMenu_ItemClick(object sender, RadMenuEventArgs e)

     

    {

     

     

    if (rtsEditEntity.SelectedTab.Value == "5")

     

    {

     

     

    int _ViewId = Convert.ToInt32(hiddenViewId.Value);

     

     

     

    RadWindow rwView = new RadWindow();

     

    rwView.ID =

     

    "RadWindow2";

     

     

     

    rwView.NavigateUrl = "~/FormsViews/EditView.aspx";

     

    rwView.VisibleOnPageLoad =

     

    true;

     

    rwView.Modal =

     

    true;

     

    rwView.Overlay =

     

    true;

     

    rwView.Behaviors =

     

    WindowBehaviors.Close;

     

    rwView.Width = 1000;

    rwView.Height = 650;

     

     

    if (rwmView.Windows.Count > 0)

     

    {

    rwmView.Windows.RemoveAt(0);

    }

    rwmView.Windows.Add(rwView);

    }

    }



    I don't understand how it will happend?
    Please assist me.

    Thanks & Regards,

    Kaushal Jani
  2. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 20 Oct 2010 Link to this post

    Hi Kaushal,

    Set EnableViewState=false for the RadWindowManager, so the RadWindows declared in it do not save their state (which includes the value of the VisibleOnPageLoad property).

    Regards,
    Georgi Tunev
    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
  3. Kaushal
    Kaushal avatar
    47 posts
    Member since:
    Sep 2010

    Posted 21 Oct 2010 Link to this post

    Hello Georgi Tunev,

    Its working now by applying EnableViewState=false for the RadWindowManager. For temporary I have Removed all radwindows on tab click but thats not standard solution. It may cause problem in future. But your solution rocks here and working smooth.

    Thank you so much once again. Keep up good assist.

    Thanks & Regards,

    Kaushal Jani
Back to Top