Advanced Form XY Position

6 posts, 0 answers
  1. Pablo Tola
    Pablo Tola avatar
    43 posts
    Member since:
    Nov 2007

    Posted 01 Dec 2009 Link to this post

    Is there a way to control the position of the advanced form when it's in modal mode? for example set the x and y values so that we can position it on a corner or center it on the screen?

    thanks.

    Pablo.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 04 Dec 2009 Link to this post

    Hello Pablo Tola,

    You can use jQuery and handle OnClientFormCreated like this:

    <script type="text/javascript">
            function OnClientFormCreated(sender, eventArgs) {
                $telerik.$(".rsAdvancedEdit").css("top", "400px");
                $telerik.$(".rsAdvancedEdit").css("left", "10px");
            }
        </script>

    Let us know if you have further questions or concerns.

    Kind regards,
    Peter
    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.
  3. Pablo Tola
    Pablo Tola avatar
    43 posts
    Member since:
    Nov 2007

    Posted 06 Dec 2009 Link to this post

    I implemented the solution and if I resize the browser window the appointment window goes back to it's default position.
  4. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 10 Dec 2009 Link to this post

    Hello,

    Indeed, the position will be reset on window resize. For static positioning I recommend using CSS:
    <style type="text/css">
        /* Static advanced form positioning */
        .rsAdvancedEdit
        {
            top: 100px !important;
            left: 100px !important;
        }
        .rsAdvDragCue
        {
            display: none !important;
        }
    </style>

    You can also override dynamic positioning:

    <script type="text/javascript">
        // Dynamic positioning override - not guaranteed to work in future versions!
        $telerik.$.popupDialog.prototype._positionForm = function ()
        {
            // This will be called each time the form needs to be repositioned
            var $ = $telerik.$;
            $(this._targetElement).css({top: "100px", left: "100px"});
        }
    </script>

    I hope this helps.

    Greetings,
    Tsvetomir Tsonev
    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.
  5. Allen
    Allen avatar
    111 posts
    Member since:
    Apr 2012

    Posted 10 May 2012 Link to this post

    can you tell me how to set the width of the advanced form.  can I set it to 30% of the original size?
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 11 May 2012 Link to this post

    Hello Allen,

    Please, try the following:
    <telerik:RadScheduler runat="server" ID="RadScheduler1">
         <AdvancedForm Width="30%" Modal="true" />
     </telerik:RadScheduler>


    Regards, Peter
    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