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

How to capture Tab click event.

Thread ID:

Created:

Updated:

Platform:

Replies:

148800 Nov 5,2019 07:30 AM UTC Nov 6,2019 08:53 AM UTC Blazor 1
loading
Tags: Tabs
j
Asked On November 5, 2019 07:30 AM UTC

Hi,

   Is there a click event on tab heading? I searched the document but I couldn't find any.

Thanks for the help.

Nevitha Ravi [Syncfusion]
Replied On November 6, 2019 08:53 AM UTC

Dear Customer, 

Greetings from Syncfusion Support. 

We can capture the tab click by using either Selecting or Selected events which will trigger while selecting the tab and after selected the tab respectively. Please find the corresponding code snippet. 

 
@using Syncfusion.EJ2.Blazor.Navigations 
 
<EjsTab> 
    <TabEvents Selected="OnTabSelected" Selecting="OnTabSelecting"></TabEvents> 
    <TabItems> 
        <TabItem Content="Twitter is an online social networking service that enables users to send and read short 140-charactermessages called tweets.Registered users can read and post tweets, but those who are unregistered can only readthem.Users access Twitter through the website interface, SMS or mobile device app Twitter Inc. is based in SanFrancisco and has more than 25 offices around the world.Twitter was created in March 2006 by Jack Dorsey,Evan Williams, Biz Stone, and Noah Glass and launched in July 2006. The service rapidly gained worldwide popularity,with more than 100 million users posting 340 million tweets a day in 2012.The service also handled 1.6 billionsearch queries per day."> 
            <ChildContent> 
                <TabHeader Text="Twitter"></TabHeader> 
            </ChildContent> 
        </TabItem> 
        <TabItem Content="Facebook is an online social networking service headquartered in Menlo Park, California. Its website waslaunched on February 4, 2004, by Mark Zuckerberg with his Harvard College roommates and fellow students EduardoSaverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes."> 
            <ChildContent> 
                <TabHeader Text="Facebook"></TabHeader> 
            </ChildContent> 
        </TabItem> 
        <TabItem Content="WhatsApp Messenger is a proprietary cross-platform instant messaging client for smartphones that operatesunder a subscription business model.It uses the Internet to send text messages, images, video, user location andaudio media messages to other users using standard cellular mobile numbers. As of February 2016, WhatsApp had a userbase of up to one billion,[10] making it the most globally popular messaging application.WhatsApp Inc., based inMountain View, California, was acquired by Facebook Inc.on February 19, 2014, for approximately US$19.3 billion."> 
            <ChildContent> 
                <TabHeader Text="Whatsapp"></TabHeader> 
            </ChildContent> 
        </TabItem> 
    </TabItems> 
</EjsTab> 
@code{ 
    public void OnTabSelected(SelectEventArgs args) 
    { 
 
    } 
    public void OnTabSelecting(SelectingEventArgs args) 
    { 
 
    } 
} 

We have documented these events in this location:  

We used these events in these how-to sections also. 

Please keep in touch for further assistance. 

Regards, 
Nevitha. 


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