What are some alternatives to checkboxes as indicators in grid?

1 Answer 330 Views
Checkbox Grid
SK
Top achievements
Rank 2
Iron
Iron
SK asked on 21 Sep 2021, 01:24 PM
In grid we have some checkbox columns that are used to indicate different things (this row has x type of detail data, for example) to help save time for users. However I can't help but wonder if there are better alternatives. Anybody have any ideas? 

1 Answer, 1 is accepted

Sort by
1
Stoyan
Telerik team
answered on 24 Sep 2021, 01:01 PM

Hello SK,

There are two alternatives to configure column checkboxes in the Grid.

A checkbox in a Data-bound column can be defined with the use of the ClientTemplate property:

 columns.Bound(p => p.Discontinued).ClientTemplate("<input type='checkbox' #= Discontinued ? checked='checked' :'' # /> ");

The ClientTemplate allows you to customize the Grid's Columns with various Html elements.

Alternatively, the Grid Overview Demo displays the use of checkboxes. Please review this screen capture that showcases the Demo.

That being said I am unsure what alternatives are you referring to? It would be helpful, if you share additional details about the scenario at hand to allow me to provide more precise advice.

Regards,
Stoyan
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/.

SK
Top achievements
Rank 2
Iron
Iron
commented on 24 Sep 2021, 03:35 PM

Hey thanks for the screen capture. I meant if it was possible to do something other than a checkbox - like a different style of indicator (for example, look at the "Preview" image here)

Was wondering if there was a built alternative to the actual "checkbox" 

Stoyan
Telerik team
commented on 29 Sep 2021, 03:29 PM

Hi SK, 

It appears that the icheck-material theme applied to input checkboxes in the Grid is overridden internally.

However there are numerous Kendo-themes available to style the Telerik UI Components. To apply the current theme to the checkbox input in the ClientTemplate use the k-checkbox class.

 columns.Bound(p => p.Discontinued).ClientTemplate("<input type='checkbox' class='k-checkbox' #= Discontinued ? checked='checked' :'' # /> ");

I hope the information above is useful. Please let me know, if you have further questions.

Tags
Checkbox Grid
Asked by
SK
Top achievements
Rank 2
Iron
Iron
Answers by
Stoyan
Telerik team
Share this question
or