This question is locked. New answers and comments are not allowed.
I am trying to edit a decimal value in a DataGridNumericalColumn, but the value does not get set when the changes are committed. Values are displayed correctly and the value is shown in the RadNumericBox for editing, but the changes are not applied to the datasource value. All other columns work correctly.
I have a CommitEdit event used for additional processing and the updated value does not reach this event.
Am I does something wrong here?
<tg:DataGridNumericalColumn PropertyName="Payment" Header="Amount" CellContentStyle="{StaticResource DefaultGridNumericStyle}" CellContentFormat="{}{0,0:C2}" SizeMode="Auto" tcp:CultureService.CultureName="en-GB"> <tg:DataGridNumericalColumn.CellEditorStyle> <Style TargetType="tci:RadNumericBox"> <Setter Property="Margin" Value="5,5,5,0"/> <Setter Property="Maximum" Value="9999999999"/> <Setter Property="ValueFormat" Value="{}{0,0:C2}"/> <Setter Property="AllowNullValue" Value="False"/> <Setter Property="ButtonsVisibility" Value="Visible"/> </Style> </tg:DataGridNumericalColumn.CellEditorStyle></tg:DataGridNumericalColumn>
My CommitEdit event:
private void OnPaymentCommitEdit(EditContext parameter){ if (parameter != null && parameter is EditContext) { EditContext context = (EditContext)parameter; if (context.CellInfo.Item is Payments) { // at this point - if I examine the decimal value that has been changed, the change has not been applied to the item ViewModel.RefreshPaymentLookupValues((Payments)context.CellInfo.Item); } } ViewModel.PaymentChangesMade = true; ViewModel.IsPaymentBeingEdited = false;}