Move Panel using Drag with Style start position in top left corner

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dkoehler59
    New Member
    • Jun 2014
    • 2

    Move Panel using Drag with Style start position in top left corner

    I want to open a panel in the top left corner of my page but then be able to drag it around the page. It will open in the top left corner but then I cannot drag the panel. It always goes back to the starting position. If I remove !important then it will allow the drag feature to work but the panel is then centered on the page when it opens.

    There is a conflict that I cannot resolve. Here is my code:

    Thanks,
    Dave

    Code:
    <asp:Panel ID="pnlPopUp" runat="server" CssClass="SearchForm" Style="left: 1% !important; top: 1% !important; display: none;" ScrollBars="Auto">
    
    <act:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="ModalPopupBackground"
        CancelControlID="btnClose" PopupControlID="pnlPopUp" TargetControlID="lnkFindTPID" 
         PopupDragHandleControlID="pnlPopUp" Drag="true" >
    </act:ModalPopupExtender>
    Last edited by Rabbit; Jun 19 '14, 03:25 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • dkoehler59
    New Member
    • Jun 2014
    • 2

    #2
    Here is the solution. You must set the opening position for the Panel in the ModalPopupExten der tag using X="2" Y="2" for example.

    Code:
    <asp:Panel ID="pnlPopUp" runat="server" CssClass="SearchForm"  ScrollBars="Auto">
    
    <act:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="ModalPopupBackground"
        CancelControlID="btnClose" PopupControlID="pnlPopUp" TargetControlID="lnkFindTPID" 
         PopupDragHandleControlID="pnlPopUp" Drag="true" X="2" Y="2">
    </act:ModalPopupExtender>

    Comment

    Working...