Interact with the Rating widget with a minimum and maximum value of 1

1 Answer 65 Views
Grid Rating
Javier
Top achievements
Rank 1
Javier asked on 06 Apr 2023, 11:49 PM

Hi,

Would there be a way to interact with the Rating widget by setting a minimum and maximum value of 1, within a grid?

For example in this way:

columns.Bound(p => p.IsFavorite).Title("Is Favorite?").Width(140).Editable("returnFalse").ClientTemplate(Html.Kendo().Rating()
                 .Name("rating_#=ProductID#")
                 .Min(1)
                 .Max(1)
                 .Label(false)
                 .HtmlAttributes(new { data_bind = "value: IsFavorite" })
                 .Selection("single")
                 .ToClientTemplate().ToHtmlString()
             );

I have tried but when I select the only star it no longer lets me deselect it

Any help would be greatly appreciated

Javier B.

1 Answer, 1 is accepted

Sort by
0
Iva
Telerik team
answered on 11 Apr 2023, 01:08 PM

Hello Javier,

 

Thank you for reaching out to us.

This is the default behavior of the Kendo Rating widget: https://demos.telerik.com/kendo-ui/rating/selection 

The described by you requires a Feature Request to provide the behavior you want.

You can vote here or implement a custom JS solution: https://feedback.telerik.com/kendo-jquery-ui/1579964-provide-null-selection

 

Kind regards,

Iva

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 Rating
Asked by
Javier
Top achievements
Rank 1
Answers by
Iva
Telerik team
Share this question
or