Set Rating component with precision
In certain scenario, it is necessary to showcase the Rating component with exact precision values. For example, while rating a movie or a food item, you may require to set the rating with exact precision like 3.7, 4.2 (i.e., in decimal values).
Syncfusion JS Rating component provides you the option to set the precision for Rating component in the following modes.
ej.Rating.Full - You can only select the full shape of Rating.
ej.Rating.Half - You can select either half or full shape of the Rating.
ej.Rating.Exact – You can select the exact precision in the Rating component.
By default, the precision mode is “Full”.
The following steps explains how to set the precision modes during initialization.
Figure 1: Rating component with precision
To change the precision mode in Run time or to set the precision mode dynamically
To change “precision” property value dynamically, you have to create an object for Rating control. Then access the “option” method using the created object to change the precision mode dynamically.
Set Rating component in Non-Editable mode
In certain scenarios like online shopping, it is necessary to display only the rating of a product and not allowing you to interact with the Rating component. For these cases, Syncfusion JS Rating component provides an option to set the “readOnly” mode for the Rating Component. When you enable the “readOnly” property, the Rating component changes to non-editable mode. Therefore, you cannot interact with the control and can only see the rating.
To set the “readOnly” property during initialization,
To set the “readOnly” property value at run time,
To get the “readOnly” property at runtime,
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:||.NET Framework:||Product Version:|