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

Rating

Class

Kendo UI Rating component

Definition

Constructors

Initializes a new instance of the Rating class.

C#
public Rating(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

If set to false, the Rating will be: disabled and will not allow the user to change its state.; excluded from the tab order and not receiving focus. or will not submit its value if part of a form..

C#
public bool? Enabled { get; set; }

Specifies the template which is used for rendering the hovered state of the items.

C#
public string HoveredTemplate { get; set; }

The handler that returns the template used for HoveredTemplate

C#
public string HoveredTemplateHandler { get; set; }

The id of the script element used for HoveredTemplate

C#
public string HoveredTemplateId { get; set; }

Specifies the template which is used for rendering the items of the Rating.

C#
public string ItemTemplate { get; set; }

The handler that returns the template used for ItemTemplate

C#
public string ItemTemplateHandler { get; set; }

The id of the script element used for ItemTemplate

C#
public string ItemTemplateId { get; set; }

The Rating displays a label by default that shows the current value out of the max value 3 / 5. If the widget does not have a selected value, the label will not be displayed initially and will be toggled after an item is selected.If label is set to false, the widget will not display the label.

C#
public RatingLabelSettings Label { get; }

The value to which the Rating items will be rendered.

C#
public double? Max { get; set; }

The value from which the Rating items will be rendered.

C#
public double? Min { get; set; }

Specifies the precision with which an item is selected. The available options are:*item - rate by selecting the whole item. *half - rate by selecting half of the item or the whole item.

C#
public string Precision { get; set; }

If set to true, the Rating will: be in readonly state and will not allow the user to change its state.; be included in the tab order and able to receive focus. or submit data if part of a form..

C#
public bool? Readonly { get; set; }

Specifies the template which is used for rendering the selected state of the items.

C#
public string SelectedTemplate { get; set; }

The handler that returns the template used for SelectedTemplate

C#
public string SelectedTemplateHandler { get; set; }

The id of the script element used for SelectedTemplate

C#
public string SelectedTemplateId { get; set; }

Specifies the selection behavior. The available options are:*continuous - all items, starting from the first one, are marked as selected. *single - a single item is marked as selected.

C#
public string Selection { get; set; }

If the option is set, the widget will automatically select the specified item when the Rating receives focus and no previous value has been set.

C#
public double? SelectValueOnFocus { get; set; }

The Rating displays the value of the item through the title attribute when it is hovered.If tooltip is set to false, the widget will not display the value of the items when hovering over them.The tooltips are not visible when the Rating is disabled.

C#
public bool? Tooltip { get; set; }

Specifies the initial value of the Rating.If a greater value than the max option is used, then the max value will be set.If a value less than the min option is used, then the min value will be set.

C#
public double? Value { get; set; }

Methods

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteHtml(TextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)