Model Binding
When using the Telerik UI for ASP.NET Core Rating component, you can bind the value to an arbitrary model property by using the RatingFor
Helper.
public ActionResult Index()
{
var model = new RatingModel
{
Rating = 7
};
return View(model);
}
public class RatingModel
{
public int Rating { get; set; }
}
@model RatingModel
@(Html.Kendo().RatingFor(model => model.Rating))
<kendo-rating for="Rating"></kendo-rating>