ejRating
Namespace: Wisej.Web.Ext.Syncfusion
Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)
The Rating control provides an intuitive Rating experience that enables you to select a number of stars that represent a Rating. You can configure the item size, orientation and the number of displayed items in the Rating control. You can also customize the Rating star image by using custom CSS.
- C#
- VB.NET
public class ejRating : ejBase
Public Class ejRating
Inherits ejBase
Constructors
ejRating()
Constructs a new instance of the ejRating class.
Example:
The following example creates the rating control and sets the number of stars and the value through the options.
var rating = new ejRating();
rating.Options.maxValue = 5;
rating.Options.value = 3;
rating.Location = new Point(20, 20);
this.Controls.Add(rating);
ejRating(options)
Constructs a new instance of the ejRating class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a rating control that accepts half stars and shows the rating selected by the user.
var rating = new ejRating(new
{
maxValue = 5,
value = 3.5,
precision = "half"
});
rating.Instance.onChange += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Rating: {e.Data.value}");
});
this.Controls.Add(rating);