ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Rating

    Show / Hide Table of Contents

    Class Rating

    Inheritance
    System.Object
    TagHelper
    EJTagHelper
    Rating
    Inherited Members
    EJTagHelper.GetList()
    EJTagHelper.GetSerializedProperties()
    EJTagHelper.GetScriptString()
    EJTagHelper.GetHtmlAttrString(IDictionary<String, Object>)
    EJTagHelper.TagName
    EJTagHelper.Id
    EJTagHelper.NameSpace
    EJTagHelper.ClassName
    EJTagHelper.IsFor
    EJTagHelper.IsChild
    EJTagHelper.IsComplex
    EJTagHelper.IsCollection
    EJTagHelper.ParentPropertyName
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.Inputs
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class Rating : EJTagHelper

    Constructors

    Rating()

    Declaration
    public Rating()

    Properties

    AllowReset

    Defines whether to show or hide the reset button in a rating component. When set to "true", the reset button will be visible to the user, and they will be able to click it to reset the rating value to its default value.

    Declaration
    [HtmlAttributeName("allowReset")]
    public bool AllowReset { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    BeforeItemRender

    Event callback that is raised before rendering each item.

    Declaration
    [HtmlAttributeName("beforeItemRender")]
    public string BeforeItemRender { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Created

    Event callback that is raised after rendering the rating.

    Declaration
    [HtmlAttributeName("created")]
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CssClass

    Defines one or more CSS classes that can be used to customize the appearance of a rating component. One or more CSS classes to customize the appearance of the rating component, such as by changing its colors, fonts, sizes, or other visual aspects.

    Declaration
    [HtmlAttributeName("cssClass")]
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Disabled

    Defines whether a rating component is enabled or disabled. A disabled rating component may have a different visual appearance than an enabled one. When set to "true", the rating component will be disabled, and the user will not be able to interact with it.

    Declaration
    [HtmlAttributeName("disabled")]
    public bool Disabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EmptyTemplate

    Defines the template that defines the appearance of each un-rated item in a rating component.

    Declaration
    [HtmlAttributeName("emptyTemplate")]
    public string EmptyTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    EnableAnimation

    Defines whether to add animation (to provide visual feedback to the user) when an item in a rating component is hovered. When set to "true", an animation will be added when the user hovers their cursor over an item in the rating component.

    Declaration
    [HtmlAttributeName("enableAnimation")]
    public bool EnableAnimation { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    [HtmlAttributeName("enablePersistence")]
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    [HtmlAttributeName("enableRtl")]
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableSingleSelection

    Defines whether to select all the items before the selected item should be in selected state in a rating component. When set to "true", only the selected item will be in the selected state, and all other items will be un-selected. When set to "false", all items before the selected one will be in the selected state.

    Declaration
    [HtmlAttributeName("enableSingleSelection")]
    public bool EnableSingleSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    FullTemplate

    Defines the template that defines the appearance of each rated item in a rating component.

    Declaration
    [HtmlAttributeName("fullTemplate")]
    public string FullTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    HtmlAttributes

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    [HtmlAttributeName("htmlAttributes")]
    public object HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Object

    ItemsCount

    Defines the specific number of items (symbols) in rating component. The rating component typically consists of a number of items, such as stars or other symbols, that represent the rating value.

    Declaration
    [HtmlAttributeName("itemsCount")]
    public int ItemsCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 5

    LabelPosition

    Defines the position of the label in rating component.

    Declaration
    [HtmlAttributeName("labelPosition")]
    public LabelPosition LabelPosition { get; set; }
    Property Value
    Type Description
    LabelPosition

    The default value is LabelPosition.Right

    LabelTemplate

    Defines the template that used as label over default label of the rating. The current value of rating passed as context to build the content.

    Declaration
    [HtmlAttributeName("labelTemplate")]
    public string LabelTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    [HtmlAttributeName("locale")]
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Min

    Defines the value that specifies minimum rating that a user can select. The value is set to 0, which means that the minimum possible rating is 0.

    Declaration
    [HtmlAttributeName("min")]
    public double Min { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    OnItemHover

    Event callback that is raised when a user hovers over an item.

    Declaration
    [HtmlAttributeName("onItemHover")]
    public string OnItemHover { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Precision

    Defines the precision type of the rating which used to component the granularity of the rating, allowing users to provide ratings with varying levels of precision.

    Declaration
    [HtmlAttributeName("precision")]
    public PrecisionType Precision { get; set; }
    Property Value
    Type Description
    PrecisionType

    The default value is PrecisionType.Full

    ReadOnly

    Defines a boolean value that specifies whether the read-only mode is enabled for a rating component, which prevents the user from modifying or interacting with the rating value but allows them to read it.

    Declaration
    [HtmlAttributeName("readOnly")]
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ShowLabel

    Defines a value that specifies whether to display a label that shows the current value of a rating. When set to "true", a label will be displayed that shows the current value of the rating; otherwise false.

    Declaration
    [HtmlAttributeName("showLabel")]
    public bool ShowLabel { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ShowTooltip

    Defines a value that defines whether to show tooltip for the items. When set to "true", show tooltip for the items.

    Declaration
    [HtmlAttributeName("showTooltip")]
    public bool ShowTooltip { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    TooltipTemplate

    Defines the template that used as tooltip content over default tooltip content of the rating. The current value of rating passed as context to build the content.

    Declaration
    [HtmlAttributeName("tooltipTemplate")]
    public string TooltipTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Value

    Defines the current rating value which used to display and update the rating selected by the user. Based on "PrecisionType", users can select ratings with varying levels of precision. The "value" is a decimal value that ranges from the minimum value to the items count, as specified by the "min" and "itemsCount" properties of the rating.

    Declaration
    [HtmlAttributeName("value")]
    public double Value { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    ValueChanged

    Event callback that is raised when the value is changed.

    Declaration
    [HtmlAttributeName("valueChanged")]
    public string ValueChanged { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Visible

    Defines a value that indicates whether the rating component is visible or hidden. When set to "true", if the rating component is visible.

    Declaration
    [HtmlAttributeName("visible")]
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved