Multiple RadWindows Opening at Server Side

4 posts, 0 answers
  1. Tanuja
    Tanuja avatar
    3 posts
    Member since:
    Sep 2008

    Posted 20 Oct 2008 Link to this post

    Hi,
    I have One Treeview controle and one radwindow manger.
    Treeview is binding on pageload dynamically. when i am clicking on first node of treeview it should show window. If am selecting another node it should display another window in window manager object. So finally if i select 5 nodes 5 windows should display but it's displaying only one winodw. Please provide the solution for this.

     

    protected void rdTreeNodes_NodeClick(object sender, RadTreeNodeEventArgs e)

     

    {

     

    string strNodeName= e.Node.Text;

     

     

    RadWindow strNode = new RadWindow();

     

    strNode.ID = strNodeName;

    strNode.RestrictionZoneID = divZone.ID;

    strNode.Top =

    Unit.Pixel(30);

     

    strNode.NavigateUrl =

    "http://mysite/mypage.aspx";

     

    strNode.VisibleOnPageLoad =

    true;

     

    RadWindowManager1.Windows.Add(strNode);

     

     

    }


    Thanks in advance..
    by
    Tanuja Ramesh

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Oct 2008 Link to this post

    Hi Tanuja,

    This behavior (showing only one window) is expected and is not directly related to the RadWindow control itself.

    Basically what you do is to create a new control every time a button is clicked - you will face the same task if you are creating a standard asp:label for example. What you need to do is to store the number of created controls and re-create them every time you click on the treeview / button.



    Regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Asma
    Asma avatar
    5 posts
    Member since:
    Aug 2011

    Posted 24 Jan 2012 Link to this post

    even m facing the same issue..i have a page which has around 4 usercontrols each holding a radgrid
    these usercontrols load radwindow on add & edit click

    now each time on the page when we click on any usercontrol radgrid it just loads only one radwindow of 1 usercontrol not different ones corresponding to different radgrids

    could you please give a detailed example for the solution
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4526 posts

    Posted 25 Jan 2012 Link to this post

    Hello Asma,

    I advise that you start off by examining this thread on the correct way to open a RadWindow from the server: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx. Once you are familiar with the approach you can simply use AJAX - dispose only the grid by placing it in an UpdatePanel with UpdateMode set to Conditional. From the code-behind you can inject a script (or simply a call to a function by passing the needed URL). This function can open a RadWindow. The different ways to open a RadWindow is explained in this article: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html. The easiest way is to have a RadWindowManager on the main page and simply calling radopen(). Thus the JavaScritp function you will call from the code-behind can also be on the main page, or it can be declared for each UC. How to use functions in UCs so that their names are unique (in order not to override each other) is explained in this KB article: http://www.telerik.com/support/kb/aspnet-ajax/general/using-dynamic-unique-names-for-javascript-functions.aspx. I am also attaching a simple project that shows the approach in action.


    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top