Grid Select All Checkbox and row background colour highlighting of only rows with checkboxes

1 Answer 6 Views
Grid
Murray
Top achievements
Rank 1
Iron
Veteran
Murray asked on 22 Nov 2022, 09:35 AM

So I have a grid where only certain rows are selectable via checkbox selection, so only certain rows have checkboxes. With the default styling, when I click on the Select All checkbox, ALL the rows, both those with checkboxes and those without get the highlighted style applied.  Is there any way to only apply the highlight to the checkbox rows?

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 25 Nov 2022, 09:21 AM

Hi Murray,

What I can suggest is to use the rowClass function to set a specific class to the rows that don't have a checkbox. The same logic should be used as the one used to display or not a checkbox for the rows. Once there is a class assigned to each row that doesn't have a checkbox a CSS rule can be added to target these rows and modify the default appearance. Please see the following example demonstrating such an approach:

https://stackblitz.com/edit/angular-us63ae?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts

I hope it points you in the right direction.

If further assistance is required for this case, could you provide a sample markup of the Grid so that I can inspect it and provide some further feedback on this case? Thank you in advance.

Regards,
Svet
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Murray
Top achievements
Rank 1
Iron
Veteran
Answers by
Svet
Telerik team
Share this question
or