Hi Fernando,
We have checked your reported query and prepared the sample based on your requirement. We can achieve your requirement by providing the unique id to each dropdown button. In your sample, providing same id is reason for your reported issue.
@foreach(var t in temp) { string id = "DropDownList" + t; <SfDropDownButton IconCss="fas fa-ellipsis-h card-options" CssClass="card-btn" ID=@id> <DropDownButtonEvents ItemSelected="@((args) => Test(args, t))"></DropDownButtonEvents> <DropDownMenuItems> <DropDownMenuItem Id="dropdown-follow" Text="Part 1" IconCss="far fa-comment-alt"></DropDownMenuItem> <DropDownMenuItem Id="dropdown-call" Text="Part 2" IconCss="fas fa-headset"></DropDownMenuItem> <DropDownMenuItem Id="dropdown-rate" Text="Part 3" IconCss="far fa-star"></DropDownMenuItem> <DropDownMenuItem Id="dropdown-cancel" Text="Part 4" IconCss="fas fa-ban"></DropDownMenuItem> </DropDownMenuItems> </SfDropDownButton> } |
Could you please check the above code and get back to us, if you need any further assistance on this.
Regards,
YuvanShankar A
How do I leave only one open based on ID?
I updated the example to better exemplify my problem, several menus are open when I need to close the previous one when I open another one.
Hi Fernando,
We have validated your reported query and difficult to achieve your requirement by using the single ID of dropdown button. And based on ID we can’t open the specific dropdown button if we use different ID for each dropdown button. So, could you please let me know the exact requirement, so that we can check and provided you the better solution.
Please get back to us, if you need any further assistance on this.
Regards,
YuvanShankar A
I found another way to meet my need, using the Open and Close events I prevent a new window from opening until the previous menu is closed, thanks for the help.
Hi Fernando,
We are glad!! that you found a solution and thanks for sharing it with us. Please get back to us if you need any other assistance.
Regards,
YuvanShankar A