set size and more behaviors from code behind

2 posts, 0 answers
  1. sf
    sf avatar
    103 posts
    Member since:
    Apr 2009

    Posted 27 Oct 2009 Link to this post

    hi in javascript we can have "oWnd.setSize(800, 600);
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Maximize + Telerik.Web.UI.WindowBehaviors.Close)
    " to add the size and multiple behaviors.

    Is it possible to do all these in code behind?  Here is my code to open the window from code behind

    RadWindow rw = radwindowmanager1.Windows[0];        
            rw.OpenerElementID = label1.ClientID;
            rw.NavigateUrl = "page1.aspx?abc=" + strID;

    thanks in advance!
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 27 Oct 2009 Link to this post

    Hi sf,

    Yes, this is possible by using the server-side API
    rw.Width = Unit.Pixel(800);
    rw.Height = Unit.Pixel(600);
    rw.Behaviors = WindowBehaviors.Move & WindowBehaviors.Maximize & WindowBehaviors.Close;


    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top