ASPxClientEdit.ValueChanged Event
Fires when the control accepts the new value entered by a user.
Declaration
ValueChanged: ASPxClientEvent<ASPxClientProcessingModeEventHandler<ASPxClientEdit>>
Event Data
The ValueChanged event's data class is ASPxClientProcessingModeEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
processOnServer | Specifies whether or not to process the event on the server. |
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 react to any key press, handle the KeyUp event.
The event’s processOnServer argument property specifies whether to finally process the event on the server and fire the ASPxEdit.ValueChanged event or completely handle the ValueChanged
event on the client-side.
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" AutoPostBack="true" ClientInstanceName="comboBox">
<Items>
<dx:ListEditItem Text="Item1" Value="10" />
<dx:ListEditItem Text="Item2" Value="20" />
</Items>
</dx:ASPxComboBox>
<dx:ASPxSpinEdit ID="ASPxSpinEdit1" runat="server" Number="0" MinValue="0" MaxValue="1"
AutoPostBack="true" ClientInstanceName="spinEdit">
<ClientSideEvents ValueChanged="OnSpinEditValueChanged" />
</dx:ASPxSpinEdit>
function OnSpinEditValueChanged(s, e) {
comboBox.SetSelectedIndex(s.GetValue());
}
For more information on how to use the ValueChanged
event, refer to the following example: ASPxGridView - How to use ASPxGridLookup as FilterRow editor via FilterTemplate.
Online Example
Limitations
Built-in editors within the grid’s Filter Row do not raise the client-side
ValueChanged
, UserInput, and KeyDown events because these editors apply internal filter mechanisms.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 ASPxEdit.ValueChanged event fires before the client-side
ValueChanged
event.