show popup above

2 posts, 1 answers
  1. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 21 Apr 2008 Link to this post


    I have a horizontal menu bar. And then I have IFRAME filling the whole page. Item from menu opens a url inside the IFRAME.

    Towards the bottom of the IFRAME - i have a calendar that I am opening up above the calendar button. I got the code from the user manual:

    function ShowPopupAbove(sender, eventArgs)
    {
     var picker = $find("<%= RadDatePicker1.ClientID %>");
     var textBox
    = picker.get_textBox();
     var popupElement
    = picker.get_popupContainer();
     var dimensions
    = picker.getElementDimensions(popupElement);
     var position
    = picker.getElementPosition(textBox);
     picker.showPopup(position.x, position.y
    - dimensions.height);
    }

    THe window is opening up fine, but the IFRAME scrolls upward in the main window when calendar opens up. that probably is for the amount of size it needs below the calendar button. But since I am opening up the window above there is no need to scroll the page. Because of the scroll my menu at the top also scrolls out of the window.

    Any solution? Should I set the z-index of IFRAME to something to stop it?




  2. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Apr 2008 Link to this post

    Hello Piyush,

    Make sure there is enough space above the datepicker to show the calendar control. Also do not forget to return false in the handler where you invoke showing the calendar control:

     <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Culture="Bulgarian (Bulgaria)">
               <DatePopupButton onclick="ShowPopupAbove(); return false;" />
               <DateInput onclick="ShowPopupAbove(); return false;" />
            </telerik:RadDatePicker>

    Hope this helps.

    Best wishes,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top