aspnet-devexpress-dot-web-dot-aspxedit-2de002bc.md
Fires when the control accepts the new value entered by a user.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public event EventHandler ValueChanged
Public Event ValueChanged As EventHandler
The ValueChanged event's data class is EventArgs.
The control raises the ValueChanged event after it accepts the value entered by a user. To accept the new value, a user can press Enter, or defocus the value field (press Tab, or click another page area).
To allow the editor to raise the server-side ValueChanged event, use one of the following options:
Set the AutoPostBack property to true.
In the client-side ValueChanged event handler, set the processOnServer argument property to true. In this case, the editor raises the client-side event and then raises the server-side ValueChanged event.
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server">
<Items>
<dx:ListEditItem Text="Item1" Value="10" />
<dx:ListEditItem Text="Item2" Value="20" />
</Items>
</dx:ASPxComboBox>
<dx:ASPxSpinEdit ID="ASPxSpinEdit1" runat="server" OnValueChanged="ASPxSpinEdit1_ValueChanged"
Number="0" MinValue="0" MaxValue="1" AutoPostBack="true">
</dx:ASPxSpinEdit>
protected void ASPxSpinEdit1_ValueChanged(object sender, EventArgs e) {
var spinEdit = sender as ASPxSpinEdit;
ASPxComboBox1.SelectedIndex = Convert.ToInt32(spinEdit.Value);
}
Protected Sub ASPxSpinEdit1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim spinEdit = TryCast(sender, ASPxSpinEdit)
ASPxComboBox1.SelectedIndex = Convert.ToInt32(spinEdit.Value)
End Sub
ValueChanged event fires before the client-side ValueChanged event.See Also