RatingBuilder

Properties

WriteAction - Func

Methods

Value(System.Nullable)

Specifies the initial value of the Rating. If the initial value is greater than the specified Max() option, the maximum value will be set as initial. If the initial value is less than the specified Min() option, the minimum value will be set as initial.

Parameters

value - System.Nullable<Int32>

The initial value.

RETURNS

Returns the current RatingBuilder instance.

Example

Razor
 
            	@(Html.Kendo().Rating()
            		.Name("rating")
            	    .Value(1)
            	)
             

Value(System.Int32)

Specifies the initial value of the Rating. If the initial value is greater than the specified Max() option, the maximum value will be set as initial. If the initial value is less than the specified Min() option, the minimum value will be set as initial.

Parameters

value - System.Int32

The initial value.

RETURNS

Returns the current RatingBuilder instance.

Example

Razor
 
            	@(Html.Kendo().Rating()
            		.Name("rating")
            	    .Value(1)
            	)
             

Value(System.Nullable)

Specifies the initial value of the Rating. If the initial value is greater than the specified Max() option, the maximum value will be set as initial. If the initial value is less than the specified Min() option, the minimum value will be set as initial.

Parameters

value - System.Nullable<Double>

The initial value.

RETURNS

Returns the current RatingBuilder instance.

Example

Razor
 
            	@(Html.Kendo().Rating()
            		.Name("rating")
            	    .Value(1)
            	)
             

Min(System.Double)

The value from which the Rating items will be rendered.

Parameters

value - System.Double

The value for Min

RETURNS

Returns the current RatingBuilder instance.

Max(System.Double)

The value to which the Rating items will be rendered.

Parameters

value - System.Double

The value for Max

RETURNS

Returns the current RatingBuilder instance.

Selection(System.String)

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.

Parameters

value - System.String

The value for Selection

RETURNS

Returns the current RatingBuilder instance.

Precision(System.String)

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.

Parameters

value - System.String

The value for Precision

RETURNS

Returns the current RatingBuilder instance.

Tooltip(System.Boolean)

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.

Parameters

value - System.Boolean

The value for Tooltip

RETURNS

Returns the current RatingBuilder instance.

Label(System.Action)

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.

Parameters

configurator - System.Action<RatingLabelSettingsBuilder>

The configurator for the label setting.

RETURNS

Returns the current instance of RatingBuilder .

Label(System.Boolean)

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.

Parameters

enabled - System.Boolean

Enables or disables the label option.

RETURNS

Returns the current instance of RatingLabelSettingsBuilder .

SelectValueOnFocus(System.Double)

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.

Parameters

value - System.Double

The value for SelectValueOnFocus

RETURNS

Returns the current RatingBuilder instance.

ItemTemplate(System.String)

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

Parameters

value - System.String

The value for ItemTemplate

RETURNS

Returns the current RatingBuilder instance.

ItemTemplateId(System.String)

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

Parameters

templateId - System.String

The ID of the template element for ItemTemplate

RETURNS

Returns the current RatingBuilder instance.

ItemTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

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

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for ItemTemplate

RETURNS

Returns the current RatingBuilder instance.

ItemTemplateHandler(System.String)

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

Parameters

templateHandler - System.String

The handler that returs the template for ItemTemplate

RETURNS

Returns the current RatingBuilder instance.

ItemTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

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

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the itemtemplate.

RETURNS

Returns the current RatingBuilder instance.

SelectedTemplate(System.String)

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

Parameters

value - System.String

The value for SelectedTemplate

RETURNS

Returns the current RatingBuilder instance.

SelectedTemplateId(System.String)

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

Parameters

templateId - System.String

The ID of the template element for SelectedTemplate

RETURNS

Returns the current RatingBuilder instance.

SelectedTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

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

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for SelectedTemplate

RETURNS

Returns the current RatingBuilder instance.

SelectedTemplateHandler(System.String)

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

Parameters

templateHandler - System.String

The handler that returs the template for SelectedTemplate

RETURNS

Returns the current RatingBuilder instance.

SelectedTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

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

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the selectedtemplate.

RETURNS

Returns the current RatingBuilder instance.

HoveredTemplate(System.String)

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

Parameters

value - System.String

The value for HoveredTemplate

RETURNS

Returns the current RatingBuilder instance.

HoveredTemplateId(System.String)

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

Parameters

templateId - System.String

The ID of the template element for HoveredTemplate

RETURNS

Returns the current RatingBuilder instance.

HoveredTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

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

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for HoveredTemplate

RETURNS

Returns the current RatingBuilder instance.

HoveredTemplateHandler(System.String)

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

Parameters

templateHandler - System.String

The handler that returs the template for HoveredTemplate

RETURNS

Returns the current RatingBuilder instance.

HoveredTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

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

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the hoveredtemplate.

RETURNS

Returns the current RatingBuilder instance.

Enabled(System.Boolean)

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..

Parameters

value - System.Boolean

The value for Enabled

RETURNS

Returns the current RatingBuilder instance.

Readonly(System.Boolean)

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..

Parameters

value - System.Boolean

The value for Readonly

RETURNS

Returns the current RatingBuilder instance.

Readonly()

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..

RETURNS

Returns the current RatingBuilder instance.

Value(System.Double)

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.

Parameters

value - System.Double

The value for Value

RETURNS

Returns the current RatingBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<RatingEventBuilder>

The client events action.

RETURNS

Returns the current RatingBuilder instance.

Example

Razor
 
            @(Html.Kendo().Rating()
                  .Name("Rating")
                  .Events(events => events
                      .Change("onChange")
                  )
            )
             

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.

In this article
PropertiesWriteAction - FuncMethodsValue(System.Nullable)Value(System.Int32)Value(System.Nullable)Min(System.Double)Max(System.Double)Selection(System.String)Precision(System.String)Tooltip(System.Boolean)Label(System.Action)Label(System.Boolean)SelectValueOnFocus(System.Double)ItemTemplate(System.String)ItemTemplateId(System.String)ItemTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)ItemTemplateHandler(System.String)ItemTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)SelectedTemplate(System.String)SelectedTemplateId(System.String)SelectedTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)SelectedTemplateHandler(System.String)SelectedTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)HoveredTemplate(System.String)HoveredTemplateId(System.String)HoveredTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)HoveredTemplateHandler(System.String)HoveredTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)Enabled(System.Boolean)Readonly(System.Boolean)Readonly()Value(System.Double)Events(System.Action)ToComponent()Expression(System.String)Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)Name(System.String)Deferred(System.Boolean)HtmlAttributes(System.Object)HtmlAttributes(System.Collections.Generic.IDictionary)ScriptAttributes(System.Object,System.Boolean)ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)Render()ToHtmlString()WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)ToClientTemplate()AsModule(System.Boolean)
Not finding the help you need?
Contact Support