Back to Devexpress

ASPxGaugeControl.Value Property

aspnet-devexpress-dot-web-dot-aspxgauges-dot-aspxgaugecontrol-3a37b07a.md

latest2.8 KB
Original Source

ASPxGaugeControl.Value Property

Gets or sets the ASPxGaugeControl’s value.

Namespace : DevExpress.Web.ASPxGauges

Assembly : DevExpress.Web.ASPxGauges.v25.2.dll

NuGet Package : DevExpress.Web.Visualization

Declaration

csharp
[DefaultValue("")]
public string Value { get; set; }
vb
<DefaultValue("")>
Public Property Value As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value that specifies the control’s value.

|

Remarks

The ASPxGaugeControl’s value specifies the value or text of the first gauge found, contained within the ASPxGaugeControl.Gauges collection.

The value is calculated as shown below:

  • Digital

  • Circular

  • Linear

  • State Indicator

Example

This example demonstrates how to change the ASPxGaugeControl’s value using an ASPxSpinEdit.

Handle the spin editor’s ValueChanged event to call the gauge’s client-side ASPxClientGaugeControl.PerformCallback method. Pass the spin editor’s value as a parameter. As a result, the ASPxGaugeControl.CustomCallback event is raised, and the spin editor’s new value, specified by the e.Parameter property, is assigned to the ASPxGaugeControl.Value property. After a custom callback has been performed, the ASPxGaugeControl is automatically re-rendered.

The animation below shows the result:

aspx
<dxe:ASPxSpinEdit runat="server" Number="0" Width="157px" Height="21px" ID="ASPxSpinEdit1">
    <ClientSideEvents ValueChanged="function(s, e) {
        gc.PerformCallback(s.GetValue());}">
    </ClientSideEvents>
</dxe:ASPxSpinEdit>
csharp
protected void ASPxGaugeControl2_CustomCallback(object source,
                  DevExpress.Web.CallbackEventArgsBase e) {
    ASPxGaugeControl2.Value = e.Parameter;
}

See Also

ASPxGaugeControl Class

ASPxGaugeControl Members

DevExpress.Web.ASPxGauges Namespace