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

Grid column header checkbox removal

Thread ID:

Created:

Updated:

Platform:

Replies:

144782 May 22,2019 10:41 AM UTC May 22,2019 11:21 AM UTC Angular - EJ 2 1
loading
Tags: Grid
Domantas
Asked On May 22, 2019 10:41 AM UTC

Hello,

I need to remove checkbox from column menu header when column is checkbox type. I have this kind of button in toolbar and it acts as duplicate so I want to remove it. How could I do this correctly ?




Pavithra Subramaniyam [Syncfusion]
Replied On May 22, 2019 11:21 AM UTC

Hi Domantas, 
 
Thanks for contacting Syncfusion support. 
 
You can remove the header checkbox by using the “headerCellInfo” event. Please refer to the below code example for more information. 
 
@Component({ 
    selector: 'app-root', 
    template: '<ejs-grid  #grid [dataSource]='data' (headerCellInfo)="headerCellInfo($event)"> 
        <e-columns> 
                              <e-column type='checkbox'></e-column> 
            <e-column field='ID' headerText='Order ID' width='120' textAlign='Right' isPrimaryKey='true'></e-column> 
            <e-column field='Name' headerText='Customer Name'></e-column> 
            <e-column field='Gender' headerText='Gender' width='150'></e-column> 
        </e-columns> 
    </ejs-grid>', 
}) 
export class AppComponent { 
 
    
     headerCellInfo(args) { 
        args.node.getElementsByClassName("e-checkbox-wrapper")[0] && args.node.getElementsByClassName("e-checkbox-wrapper")[0].remove(); 
    } 
}  
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 


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