This is a migrated thread and some comments may be shown as answers.

Advanced Form XY Position

5 Answers 128 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Pablo Tola
Top achievements
Rank 2
Pablo Tola asked on 02 Dec 2009, 12:06 AM
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.

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 04 Dec 2009, 11:01 AM
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.
0
Pablo Tola
Top achievements
Rank 2
answered on 06 Dec 2009, 03:50 PM
I implemented the solution and if I resize the browser window the appointment window goes back to it's default position.
0
T. Tsonev
Telerik team
answered on 10 Dec 2009, 02:12 PM
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.
0
Allen
Top achievements
Rank 1
answered on 10 May 2012, 10:55 PM
can you tell me how to set the width of the advanced form.  can I set it to 30% of the original size?
0
Peter
Telerik team
answered on 11 May 2012, 02:26 PM
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.
Tags
Scheduler
Asked by
Pablo Tola
Top achievements
Rank 2
Answers by
Peter
Telerik team
Pablo Tola
Top achievements
Rank 2
T. Tsonev
Telerik team
Allen
Top achievements
Rank 1
Share this question
or