ASP.NET MVC - EJ2

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

    Show / Hide Table of Contents

    Class RatingBuilder

    Inheritance
    System.Object
    ControlBuilder
    RatingBuilder
    Inherited Members
    ControlBuilder.Context
    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 RatingBuilder : ControlBuilder

    Constructors

    RatingBuilder()

    Declaration
    public RatingBuilder()

    RatingBuilder(Rating)

    Declaration
    public RatingBuilder(Rating model)
    Parameters
    Type Name Description
    Rating model

    Fields

    model

    Declaration
    public Rating model
    Field Value
    Type Description
    Rating

    Properties

    HtmlAttr

    Declaration
    public IDictionary<string, object> HtmlAttr { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Output

    Declaration
    public override TextWriter Output { get; set; }
    Property Value
    Type Description
    System.IO.TextWriter
    Overrides
    ControlBuilder.Output

    Methods

    AllowReset(Boolean)

    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
    public RatingBuilder AllowReset(bool allowReset = true)
    Parameters
    Type Name Description
    System.Boolean allowReset
    Returns
    Type Description
    RatingBuilder

    BeforeItemRender(String)

    Event callback that is raised before rendering each item.

    Declaration
    public RatingBuilder BeforeItemRender(string beforeItemRender)
    Parameters
    Type Name Description
    System.String beforeItemRender
    Returns
    Type Description
    RatingBuilder

    Created(String)

    Event callback that is raised after rendering the rating.

    Declaration
    public RatingBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    RatingBuilder

    CssClass(String)

    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
    public RatingBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    RatingBuilder

    Disabled(Boolean)

    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
    public RatingBuilder Disabled(bool disabled = true)
    Parameters
    Type Name Description
    System.Boolean disabled
    Returns
    Type Description
    RatingBuilder

    EmptyTemplate(String)

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

    Declaration
    public RatingBuilder EmptyTemplate(string emptyTemplate)
    Parameters
    Type Name Description
    System.String emptyTemplate
    Returns
    Type Description
    RatingBuilder

    EnableAnimation(Boolean)

    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
    public RatingBuilder EnableAnimation(bool enableAnimation = true)
    Parameters
    Type Name Description
    System.Boolean enableAnimation
    Returns
    Type Description
    RatingBuilder

    EnablePersistence(Boolean)

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

    Declaration
    public RatingBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    RatingBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

    Declaration
    public RatingBuilder EnableRtl(bool enableRtl = true)
    Parameters
    Type Name Description
    System.Boolean enableRtl
    Returns
    Type Description
    RatingBuilder

    EnableSingleSelection(Boolean)

    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
    public RatingBuilder EnableSingleSelection(bool enableSingleSelection = true)
    Parameters
    Type Name Description
    System.Boolean enableSingleSelection
    Returns
    Type Description
    RatingBuilder

    FullTemplate(String)

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

    Declaration
    public RatingBuilder FullTemplate(string fullTemplate)
    Parameters
    Type Name Description
    System.String fullTemplate
    Returns
    Type Description
    RatingBuilder

    HtmlAttributes(Object)

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

    Declaration
    public RatingBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    RatingBuilder

    ItemsCount(Int32)

    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
    public RatingBuilder ItemsCount(int itemsCount)
    Parameters
    Type Name Description
    System.Int32 itemsCount
    Returns
    Type Description
    RatingBuilder

    LabelPosition(LabelPosition)

    Defines the position of the label in rating component.

    Declaration
    public RatingBuilder LabelPosition(LabelPosition labelPosition)
    Parameters
    Type Name Description
    LabelPosition labelPosition
    Returns
    Type Description
    RatingBuilder

    LabelTemplate(String)

    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
    public RatingBuilder LabelTemplate(string labelTemplate)
    Parameters
    Type Name Description
    System.String labelTemplate
    Returns
    Type Description
    RatingBuilder

    Locale(String)

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

    Declaration
    public RatingBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    RatingBuilder

    Min(Double)

    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
    public RatingBuilder Min(double min)
    Parameters
    Type Name Description
    System.Double min
    Returns
    Type Description
    RatingBuilder

    OnItemHover(String)

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

    Declaration
    public RatingBuilder OnItemHover(string onItemHover)
    Parameters
    Type Name Description
    System.String onItemHover
    Returns
    Type Description
    RatingBuilder

    Precision(PrecisionType)

    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
    public RatingBuilder Precision(PrecisionType precision)
    Parameters
    Type Name Description
    PrecisionType precision
    Returns
    Type Description
    RatingBuilder

    ReadOnly(Boolean)

    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
    public RatingBuilder ReadOnly(bool readOnly = true)
    Parameters
    Type Name Description
    System.Boolean readOnly
    Returns
    Type Description
    RatingBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.HtmlString

    ShowLabel(Boolean)

    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
    public RatingBuilder ShowLabel(bool showLabel = true)
    Parameters
    Type Name Description
    System.Boolean showLabel
    Returns
    Type Description
    RatingBuilder

    ShowTooltip(Boolean)

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

    Declaration
    public RatingBuilder ShowTooltip(bool showTooltip = true)
    Parameters
    Type Name Description
    System.Boolean showTooltip
    Returns
    Type Description
    RatingBuilder

    TooltipTemplate(String)

    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
    public RatingBuilder TooltipTemplate(string tooltipTemplate)
    Parameters
    Type Name Description
    System.String tooltipTemplate
    Returns
    Type Description
    RatingBuilder

    Value(Double)

    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
    public RatingBuilder Value(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    RatingBuilder

    ValueChanged(String)

    Event callback that is raised when the value is changed.

    Declaration
    public RatingBuilder ValueChanged(string valueChanged)
    Parameters
    Type Name Description
    System.String valueChanged
    Returns
    Type Description
    RatingBuilder

    Visible(Boolean)

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

    Declaration
    public RatingBuilder Visible(bool visible = true)
    Parameters
    Type Name Description
    System.Boolean visible
    Returns
    Type Description
    RatingBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved