Aligning popup of RadPopupEditor.

2 posts, 0 answers
  1. laimonassutkus
    laimonassutkus avatar
    9 posts
    Member since:
    Mar 2017

    Posted 20 Jul 2017 Link to this post


    I want to align my popup to snap the left or the right corner of its RadPopupEditor item. (See the picture for more details).

    As you can see the popup is not aligned neither to the left nor to the right. How can I control the behaviour of the popup?

    Things i have tried so far:

                popUpEditorConnect.PopupEditorElement.Alignment = ContentAlignment.TopLeft;             popUpEditorConnect.Popup.AlignmentRectangleOverlapMode = AlternativeCorrectionMode.Flip;             popUpEditorConnect.Popup.DropDownAnimationDirection = RadDirection.Left;             popUpEditorConnect.Popup.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToEdges;              popUpEditorConnect.Popup.HorizontalPopupAlignment = HorizontalPopupAlignment.LeftToLeft;

  2. Hristo
    Hristo avatar
    1189 posts

    Posted 20 Jul 2017 Link to this post

    Hello Laimonas,

    Thank you for writing.

    You can change the location of the popup by handling the PopupOpening event. Please check my code snippet below: 
    private void RadPopupEditor1_PopupOpening(object sender, CancelEventArgs e)
        RadPopupOpeningEventArgs args = (RadPopupOpeningEventArgs)e;
        int width = radPopupEditor1.PopupForm.Width - radPopupEditor1.Width;
        args.CustomLocation = new Point(args.CustomLocation.X - width, args.CustomLocation.Y);

    I hope this helps. Please let me know if you need further assistance.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top