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.
Example
@(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.
Example
@(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.
Example
@(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
Max(System.Double)
The value to which the Rating items will be rendered.
Parameters
value - System.Double
The value for Max
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
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
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
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.
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.
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
ItemTemplate(System.String)
Specifies the template which is used for rendering the items of the Rating.
Parameters
value - System.String
The value for ItemTemplate
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
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
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
ItemTemplate(Kendo.Mvc.UI.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.
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
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
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
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
SelectedTemplate(Kendo.Mvc.UI.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.
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
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
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
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
HoveredTemplate(Kendo.Mvc.UI.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.
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
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
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..
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
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<RatingEventBuilder>
The client events action.
Example
@(Html.Kendo().Rating()
.Name("Rating")
.Events(events => events
.Change("onChange")
)
)
ToComponent()
Returns the internal view component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
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.
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.
Render()
Renders the component in place.
ToHtmlString()
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.