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

Do not show close button only on first (home) tab

Hello,

is there a possibility not to show close (X) button on first tab but show them on other tabs?

I want to let close all tabs instead of first, home tab and it is confusing that is show close image.

3 Replies

KR Keerthana Rajendran Syncfusion Team March 7, 2018 05:46 AM UTC

Dear Customer, 
 
Thank you for contacting Syncfusion support. 
 
Yes , you can hide the close button of first tab item alone through create event of tab as shown below 
 
<ej-tab id="closeTab" #close [showCloseButton]="true" style="width: 500px" (create)="oncreate($event)"> 
    <ul> 
        <li><a rel='nofollow' href="#rome">Rome</a></li> 
        <li><a rel='nofollow' href="#paris">Paris</a></li> 
        <li><a rel='nofollow' href="#london">London</a></li> 
   </ul> 
    <div id="rome"> 
        Rome is one of the world's most fascinating cities. The old adage that Rome was not built in a day — and that you won't see it in one or even in three — is true. For the intrepid traveler who can keep pace, here is a list of must-sees. But remember what the Romans say: "Even a lifetime isn't enough to see Rome." 
    </div> 
    <div id="paris"> 
        Paris, the city of lights and love - this short guide is full of ideas for how to make the most of the romanticism that oozes from every one of its beautiful corners.You couldn't possibly visit Paris without seeing the Eiffel Tower. Even if you do not want to visit this world famous structure, you will see its top from all over Paris. The tower rises 300 meters tall (984 ft); when it was completed at the end of the nineteenth century 
    </div> 
     
</ej-tab> 
 
 
export class GridComponent { 
     
    oncreate(event) 
    { 
        $("#closeTab").find("li:first>div.e-icon").css("display","none"); 
    } 
} 
 
 
We have attached a sample for your reference which can be downloaded from the following link 
 
 
Regards, 
Keerthana. 



UN Unknown Syncfusion Team March 7, 2018 08:03 AM UTC

Thank you! It was very helpful, the problem is solved!


KR Keerthana Rajendran Syncfusion Team March 8, 2018 04:20 AM UTC

Dear Customer, 
 
Most Welcome. Please get back to us if you require further assistance on this. We will be happy to assist you. 
 
Regards, 
Keerthana. 


Loader.
Live Chat Icon For mobile
Up arrow icon