Personalising kendoGridSelectAllCheckbox

0 Answers 181 Views
CheckBox General Discussions Grid MultiSelect
Emna
Top achievements
Rank 1
Emna asked on 12 May 2022, 10:25 AM

I have a kendo-grid-checkbox-column that needs a checkbox in the header. When clicking on it, it' supposed to be a 

SelectAll checkbox there's a specific row i do'nt want to select.

First,  i thought i would just use:   

<ng-template kendoGridHeaderTemplate>   

<input  (click)="onclick( )"  type="checkbox"  >

</ng-template>

followed by an <ng-template kendoGridCellTemplate> 

 But, for unknown reasons, that made it impossible for me to select the other rows , as if they were disabled 

 

Georgi
Telerik team
commented on 16 May 2022, 03:16 PM

Hi Emna,

Thank you for providing an explanation of the issue and a code snippet.

May I ask what was the code in the onclick handler? If you could fork the demo below and modify it to reproduce the undesired behavior, that would be great.

For the time being I can suggest using a CheckboxColumnComponent as seen in this demo:
https://stackblitz.com/edit/angular-fv6ud9?file=src/app/app.component.ts

This approach also has its limitations. For example, clicking the SelectAll checkbox twice, does not clear the selection. This is because if any row is not selected yet, the SelectAll checkbox selects our disabled row, "Chang", after which we immediately deselect it.

There are multiple ways of going about the problem, but it is important for me to understand what exactly the desired outcome it. For this reason I would like to ask what you would like to happen when the user clicks "select all" and then clicks on the row you don't want to select.

Should this row be selectable at all?

Looking forward to hearing from you.

Regards,
Georgi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

No answers yet. Maybe you can help?

Tags
CheckBox General Discussions Grid MultiSelect
Asked by
Emna
Top achievements
Rank 1
Share this question
or