Skip to main content
Tab

ASPxRatingControl.FillPrecision Property

Gets or sets a value that specifies the manner items are filled.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(RatingControlItemFillPrecision.Half)]
public RatingControlItemFillPrecision FillPrecision { get; set; }

Property Value

Type Default Description
RatingControlItemFillPrecision Half

One of the RatingControlItemFillPrecision enumerator values.

Available values:

Name Description
Exact

An item is filled according to the exact decimal part of the value.

Half

An item is half filled if the decimal part of the control’s value is in the range 25-74.

Full

An item is fully filled if the decimal part of the control’s value is in the range 50-99.

Remarks

Use the FillPrecision property to specify the manner items are filled, if the control’s value (the ASPxRatingControl.Value property) is a fractional number.

Example

This part of the Voting demo illustrates how to use the ASPxRatingControl‘s ASPxRatingControl.FillPrecision property.

The ASPxRatingControl‘s ASPxRatingControl.FillPrecision property value is specified with accordance to the selected item of the ASPxComboBox.

protected void Page_Load(object sender, EventArgs e) {
    if(!IsPostBack) {
        Array values = Enum.GetValues(typeof(RatingControlItemFillPrecision));
        foreach(object value in values)
            cmbPrecision.Items.Add(Enum.GetName(typeof(RatingControlItemFillPrecision), (int)value));
            cmbPrecision.Value = ratingControl.FillPrecision.ToString();
    }
    ratingControl.FillPrecision = (RatingControlItemFillPrecision)cmbPrecision.SelectedIndex;
    ... 
    }
}
See Also