Back to Devexpress

ASPxRatingControl.FillPrecision Property

aspnet-devexpress-dot-web-dot-aspxratingcontrol-f55a7a6e.md

latest3.6 KB
Original Source

ASPxRatingControl.FillPrecision Property

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

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(RatingControlItemFillPrecision.Half)]
public RatingControlItemFillPrecision FillPrecision { get; set; }
vb
<DefaultValue(RatingControlItemFillPrecision.Half)>
Public Property FillPrecision As RatingControlItemFillPrecision

Property Value

TypeDefaultDescription
RatingControlItemFillPrecisionHalf

One of the RatingControlItemFillPrecision enumerator values.

|

Available values:

NameDescription
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.

csharp
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;
    ... 
    }
}
aspx
<dxrc:ASPxRatingControl ID="ratingControl" runat="server" ClientInstanceName="ratingControl">
    ...
</dxrc:ASPxRatingControl>

<dxe:ASPxComboBox ID="cmbPrecision" runat="server" Width="110" AutoPostBack="true" />
...

See Also

Value

Rating Control

ASPxRatingControl Class

ASPxRatingControl Members

DevExpress.Web Namespace