Client-Side RadWindow Creation

5 posts, 0 answers
  1. Clifton Brown
    Clifton Brown avatar
    8 posts
    Member since:
    Jun 2008

    Posted 23 Nov 2010 Link to this post

    hello, is there a way for me to create RadWindows dynamically on the client side?

    Here is my situation: I have a page that has several links that when clicked needs to open a RadWindow. each link opens a different window. What I do now is create the windows on Page Load and then add the "onclick" javascript attribute to the link's. Therefore, even if the links are never clicked by the user the windows are still being created.

    I want to use client-side because I don't want to trigger a postback by creating the windows in code-behind via a button. Now my javascript will take as parameter the URL of the window to open and other properties such as window dimensions. The clien-side script will then create the RadWindow and open it. The page has a window manager but I do not want to create the windows statically inside the window manager because I may not know ahead of time how many windows I need.

    Also, the window manager is created in the master page that I use to style all my pop-up windows, that's why i cant define windows statically because that master page is used for many different pop-up windows. Finally I would like the window that is created on client-side to inherit the standard properties i have set on the Window manager in the master page.

    Can this be done?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Nov 2010 Link to this post

    Hello,


    There are several functions that let you open a RadWindow object from your client-side javascript: Check the following documentation on how to do it.
    Opening Windows


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 24 Nov 2010 Link to this post

    Hi Clifton,

     The radopen method does exactly what you need and also the best place for the RadWindowManager is the MasterPage as you have done. What you should do now is to set the desired common properties to the RadWindowManager and then open RadWindows with radopen(url, null) - this will create a new RadWindow dynamically on the client. If you want also to destroy the created client object for the RadWindow when it is closed you can also add DestroyOnClose="true" in the RadWindowManager declaration.


    All the best,

    Svetlina
    the Telerik team

     

    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  5. Clifton Brown
    Clifton Brown avatar
    8 posts
    Member since:
    Jun 2008

    Posted 24 Nov 2010 Link to this post

    My thanks to both Shinu & Admin... just what I was looking for :-)
  6. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 01 Dec 2014 in reply to Clifton Brown Link to this post

    Can you send the sample code please?


    Thanks in Advance,
    Dhamu
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017