We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ItemSelected event no longer exists

Hi,

Another upgrade issue, I've looked in the documentation and cannot find any help.

I've upgraded from EJ2.Blazor v17.3.0.29-beta to v17.4.0.44 and it seems the "ItemSelected" event no longer works...


Example Razor

<EjsDropDownButton ItemSelected="ShowArchiveModal" Content="Archive As" Items="@CategoryButtonItems" />





Example void

void ShowArchiveModal(Syncfusion.EJ2.Blazor.SplitButtons.MenuEventArgs args)
{
collapsemaincontainer = true;

var modalparameters = new ModalParameters();
modalparameters.Add("InboxFileID", intInboxFileID);
modalparameters.Add("CategoryID", Int32.Parse(args.Item.Id));

var modaloptions = new ModalOptions()
{
DisableBackgroundCancel = true,
HideCloseButton = true
};

BlazoredModalService.OnClose += ArchiveModalClosed;
BlazoredModalService.Show<ArchiveInboxFileModal>("Archive File - " + args.Item.Text, modalparameters, modaloptions);
}




I get a browser breaking issue at runtime

System.InvalidOperationException: Object of type 'Syncfusion.EJ2.Blazor.SplitButtons.EjsDropDownButton' does not have a property matching the name 'ItemSelected'.



This worked in the beta and i'd followed Syncfusion code examples to get this working, what am i doing wrong?

Many thanks,

Dean.






3 Replies

SD Saranya Dhayalan Syncfusion Team January 28, 2020 05:10 AM UTC

Hi Dean 
 
Thank you for contacting Syncfusion support 
 
We have checked your reported issue we would like to let you know that Event initialization has been changed in 17.4.39 version. Now, you need to specify events using the DropDownButtonEvents component. Please find the below code snippet: 
 
@using Syncfusion.EJ2.Blazor.SplitButtons 
 
<EjsDropDownButton  Items="@ddlItems" IconCss="e-ddb-icons e-profile"> 
    <DropDownButtonEvents ItemSelected="ShowArchiveModal"></DropDownButtonEvents> 
</EjsDropDownButton> 
 
    @code{ 
 
        public List<Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem> ddlItems { get; set; } = new List<Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem> 
    { 
            new Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem { Text = "Dashboard", IconCss = "e-ddb-icons e-dashboard" }, 
            new Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem { Text = "Notifications", IconCss = "e-ddb-icons e-notifications" }, 
            new Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem { Text = "User Settings", IconCss = "e-ddb-icons e-settings" }, 
            new Syncfusion.EJ2.Blazor.SplitButtons.DropDownButtonItem { Text = "Log Out", IconCss = "e-ddb-icons e-logout" } 
        }; 
 
        public void ShowArchiveModal(MenuEventArgs args) 
        { 
            Console.WriteLine("select event triggered"); 
        } 
 
    } 
 
Please find the release notes link: 
 
 
Could you please check the above code snippet and get back to us if you need further assistance on this? 
 
Regards, 
Saranya D 



DW Dean Walker January 28, 2020 09:07 AM UTC

Ahhhhh.


That makes sense now, i did read the release notes but did not pick up on this, now i understand how you document these kinds of changes I will hopefully pick up on things like this moving forwards, apologies and many thanks.


SD Saranya Dhayalan Syncfusion Team January 28, 2020 09:57 AM UTC

Hi Dean 
 
Most Welcome.  
 
Please let us know, if you need any further assistance on this.  
 
Regards, 
Saranya D 


Loader.
Live Chat Icon For mobile
Up arrow icon