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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ItemSelected event no longer exists

Thread ID:

Created:

Updated:

Platform:

Replies:

150982 Jan 27,2020 10:02 AM UTC Jan 28,2020 09:57 AM UTC Blazor 3
loading
Tags: Split Button
Dean Walker
Asked On January 27, 2020 10:02 AM UTC

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.






Saranya Dhayalan [Syncfusion]
Replied On 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 


Dean Walker
Replied On 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.

Saranya Dhayalan [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon