New to Telerik UI for ASP.NET Core? Download free 30-day trial

Precision

The Rating allows you to control the precision with which an item is selected.

To configure the Precision property, use either of the available properties:

  • item—Selects the whole item.
  • half—Selects half of the item.

Item Precision

The item mode is the default precision mode of the Rating. If not configured, the widget will automatically set the Precision property to "item" which enables only whole stars to be selected by click or keyboard interaction.

    @(Html.Kendo().Rating()
        .Name("rating")
        .Precision("item")
    )
    <kendo-rating name="rating" precision="item"></kendo-rating>

Half Precision

To configure he half precision mode of the Rating, set the Precision option to "half" which allows you to set decimal values. The passed value is rounded during the rendering phase to display a full or half item based on the following value specifics:

  • A value which is less than or equal to .5 displays half an item.
  • A value which is greater than .5 displays a full item.
    @(Html.Kendo().Rating()
        .Name("rating1")
        .Min(1)
        .Max(6)
        .Value(3.2)
        .Precision("half")
    )
    <br>
    @(Html.Kendo().Rating()
        .Name("rating2")
        .Min(1)
        .Max(6)
        .Value(3.5)
        .Precision("half")
    )
    <br>
    @(Html.Kendo().Rating()
        .Name("rating3")
        .Min(1)
        .Max(6)
        .Value(3.7)
        .Precision("half")
    )
    <kendo-rating name="rating"
                  min="1"
                  max="6"
                  value="3.2"
                  precision="half">
    </kendo-rating>
    <br>
    <kendo-rating name="rating2"
                  min="1"
                  max="6"
                  value="3.5"
                  precision="half">
    </kendo-rating>
    <br>
    <kendo-rating name="rating3"
                  min="1"
                  max="6"
                  value="3.7"
                  precision="half">
    </kendo-rating>

See Also

In this article