ASPxEdit.ValueChanged Event
Fires when the control accepts the new value entered by a user.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Event Data
The ValueChanged event's data class is EventArgs.
Remarks
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-sideValueChanged
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);
}
ASPxGridLookup Limitations
- When the ASPxGridLookup editor’s value changes, the editor sends a callback to the server to synchronize its value with the internal ASPxGridView control’s selection. Because of this, the server-side
ValueChanged
event fires before the client-side ValueChanged event.
See Also