Raddock shifts position on postback

3 posts, 0 answers
  1. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 29 Sep 2011 Link to this post


    I have Raddock with my custom logic as appointment form over Scheduler. It works well except for one little issue.

    I have checkbox on the Raddock that fires full postback (I use event CheckedChanged event for hiding/showing more controls). For some reason upon that full postback my Raddock form shifts from the center to the upper left corner. I would appreciate if you could advise how to keep Raddock position intact upon full postbacks. Thanks! See below my design view of aspx page:
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">

    <script type="text/javascript">
    function openForm() {
    var dock = $find("<%= RadDock1.ClientID %>");
    // Center the RadDock on the screen
    var viewPort = $telerik.getViewPortSize();
    var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
    var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
    $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });



    function hideForm() {
    var dock = $find("<%= RadDock1.ClientID %>");

    return true;

    function dockMoved(sender, args) {
    //Return RadDock to his original HTML parent so it gets updated via ajax
    $get("<%= DockPanel.ClientID %>").appendChild(sender.get_element());


    <asp:UpdatePanel runat="server" ID="UpdatePanel1" ChildrenAsTriggers="true" >
    <asp:Panel runat="server" ID="DockPanel">
    <telerik:RadDock runat="server" ID="RadDock1"  Skin="Windows7" Width="800px" Height="600px" Closed="true"
    Style="z-index: 2000;" Title="Appointment" OnClientDockPositionChanged="dockMoved" >

    <asp:CheckBox ID="chkAllDay" runat="server" Checked = "true" AutoPostBack="true" Text="All Day" />



    <telerik:RadScheduler ID="RadScheduler1" runat="server"  Skin="Windows7" DataEndField="End" DataKeyField="ID"
    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" 
    DataSourceID="SqlDataSource1" DataStartField="Start" DataSubjectField="Subject"
    HoursPanelTimeFormat="htt" OverflowBehavior="Expand" ValidationGroup="RadScheduler1" 
    TimeSlotContextMenuSettings-EnableDefault="true"  SelectedView="MonthView">

  2. brian
    brian avatar
    23 posts
    Member since:
    Aug 2008

    Posted 30 Sep 2011 Link to this post


    I would appreciate if Telerik experts could provide some comments on my question formulated above.

  3. Slav
    Slav avatar
    1359 posts

    Posted 04 Oct 2011 Link to this post

    Hi Brian,

    You can check the solution of the problem at hand in your support ticket on the matter. Please use only one ticket for a particular issue when requesting support in the future, as otherwise the consistency of our correspondence will be disrupted and it will take additional time to isolate the exact problem. That being said, I would suggest continuing our discussion in the corresponding support ticket.

    All the best,
    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