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.
Hi,
I am using kendo grid to display kendo rating. the stars are displaying on edit mode only.
GRID
@(Html.Kendo().Grid<language>()
.Name("LanguageGrid")
.EnableCustomBinding(true)
.Columns(columns =>{
columns.Bound(p => p.languagename).Width(200).Title("Language").EditorTemplateName("_DropdownEditor").ClientTemplate("#=languagename.description#");
columns.Bound(c =>c.speak).Width(300).Title("Speak").EditorTemplateName("_Rating").ClientTemplate("#=speak#");
columns.Bound(p => p.read).Width(300).Title("Read").EditorTemplateName("_Rating").ClientTemplate("#=read#");
columns.Bound(p => p.write).Width(300).Title("Write").EditorTemplateName("_Rating").ClientTemplate("#=write#");
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(250);
})
.ToolBar(toolbar => {
toolbar.Create();
})
_Rating.cshtml
@(Html.Kendo().RatingFor(m => m)