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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid header checkbox, Angular 7+, TypeScript 3+

Thread ID:

Created:

Updated:

Platform:

Replies:

141943 Jan 11,2019 11:07 AM UTC Jan 11,2019 11:22 AM UTC React - EJ 2 1
loading
Tags: Grid
Laurens Albers
Asked On January 11, 2019 11:09 AM UTC

 Hi,

I have a grid with a column containing checkboxes, but setting the type as checkbox also generates a checkbox on the header.

Any idea on how to replace the header checkbox with the headerText and if that's not possible, "disable".

 columns: object[] = [
    { field: 'id', headerText: 'Name', textAlign: 'Right', width: 40 },
    { field: 'type', headerText: 'Type', textAlign: 'Right', width: 40 },
    { field: 'length', headerText: 'Length', textAlign: 'Right', width: 40 },
    { field: 'format', headerText: 'Format', textAlign: 'Right', width: 40 },
    { field: 'load', headerText: 'Load', type: 'checkbox', textAlign: 'Right', width: 20, } // needs to show headertext  (or be disabled)
  ];

Something like the property displayAsCheckBox is what im looking for, without the disabled column of checkboxes.

Madhu Sudhanan P [Syncfusion]
Replied On January 11, 2019 11:22 AM UTC

Hi Laurens, 

Thanks for contacting Syncfusion support. 

You can use the headerTemplate of the column as follow to set the header text for the checkbox column. 


[ 
    . . . . 
    { field: 'load', headerText: 'Load',headerTemplate: "${headerText}", type: 'checkbox', textAlign: 'Right', width: 20, } // needs to show headertext  (or be disabled) 
  ]; 



Regards, 
Madhu Sudhanan P 


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

;