Programmatic RadWindow

7 posts, 0 answers
  1. Kyle Schiele
    Kyle Schiele avatar
    20 posts
    Member since:
    Aug 2012

    Posted 26 Oct 2007 Link to this post

    Can someone advise how to programmatically create a radwindow and it needed elements?

    And then add it to the page.

    Kyle

  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 26 Oct 2007 Link to this post

    The following example illustrates how to create new windows on the client:
    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/WindowObject/DefaultCS.aspx

    I suppose , that if you want to create it on the server, you should create an object from RadWindow type and add it to RadWindowManager.Windows collection:
    RadWindow myWin = new RadWindow();
    myWin.properties=...
    .....
    RadWindowManager1.Windows.Add(myWin);
  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 29 Oct 2007 Link to this post

    Hello Kyle,

    If you are creating a single RadWindow Prometheus only, you don't need to add it to the RadWindowManager Windows collection. You should add it to the form's Controls collection instead.
    e.g.

    Telerik.Web.UI.RadWindow newwindow = new Telerik.Web.UI.RadWindow();
    newwindow.NavigateUrl =
    "http://www.google.com";
    newwindow.ID =
    "RadWindow1";
    newwindow.VisibleOnPageLoad =
    true;
    //set other properties
    form1.Controls.Add(newwindow);




    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Chris
    Chris avatar
    6 posts
    Member since:
    May 2008

    Posted 29 Jul 2008 Link to this post

    Is is possible to programmatically add controls to the RadWindow once you create it.  I want to display system messages to the user, such as exception messages.

    I currently have a BasePage object that all my site pages inherit, this allows me to provide common functionality to all forms.  This base has a "ShowMessage" method that takes an exception object and formats it and displays it to the user in a label control that is programmatically added to the form in the base class.

    I want to replace this label with a RadWindow.  I have been able to get a window to open with correct title, icon, etc., but I am unable to add content to the body of the window.

    I must be overlooking something, is there a way to programmatically add controls to the RadWindow to be renderd at runtime.

    Thanks,
    Chris
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 31 Jul 2008 Link to this post

    Hi Chris,

    You cannot add controls in the RadWindow control - it is designed to replace the standard browser window and that is why, just as it, it only loads an external page. You can create an additional WebForm, display the needed information in it and then show it in the RadWindow.

    I am not quite sure about your exact scenario and requirements, but I also recommend to examine the RadToolTip control, which is very useful in such scenarios. You can find its online demos here.

    Greetings,
    Svetlina
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Anthony
    Anthony avatar
    20 posts
    Member since:
    Feb 2008

    Posted 10 May 2010 Link to this post

    Hi,

    I understand that the RadWindow control can now have custom content: http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx

    Can you please let me know which build included this update? I am sure the latest will contain it. but i would like to confirm if my current version excludes it.

    I am using 2009.2.701.20...

    Thanks



  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 11 May 2010 Link to this post

    Hi Anthony,

    This functionality was added in Q3 2009.

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