New to Telerik UI for ASP.NET MVC? 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, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

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 for the HoveredTemplate

C#
public string HoveredTemplateHandler { get; set; }

The id for the 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 for the ItemTemplate

C#
public string ItemTemplateHandler { get; set; }

The id for the 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; set; }

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 for the SelectedTemplate

C#
public string SelectedTemplateHandler { get; set; }

The id for the 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

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

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

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

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)