Search results

Position Popup Open

Popup open position can be changed according to the requirement. Popup open position can be changed in OnOpen event by setting Top and Left for the popup element.

In the following example, the Top position of the popup element is changed in open event.

@using Syncfusion.EJ2.Blazor.SplitButtons

<EjsDropDownButton Items="@Items" Content="EDIT" OnOpen="Open"></EjsDropDownButton>

@code {
    public List<ItemModel> Items = new List<ItemModel>
    {
        new ItemModel{ Text = "Cut" },
        new ItemModel{ Text = "Copy" },
        new ItemModel{ Text = "Paste" }
    };
    public void Open(BeforeOpenCloseMenuEventArgs args)
    {
        args.Element.SetAttribute("style", "margin:-155px -27px");
    }
}

Output be like

Button Sample