Current filter:
                                You should refresh the page.
                                  • Hello,

                                    We are using a DevExpress Wpf Property GridControl, we have a datetime field we want to show an editor. The Editor needs to display validation and allow the users to change a date using the up/down arrow keys. We haven't been able to find a solution which gives us both of these properties. See the attached video Arrival Time field is using a CellTemplate with a DateEdit (PART_Editor), this field can see validation. However the up/down keys do not change the values but changes to a different property. The Departure Time is using a Content Template with a DateEdit control. This variation allows the up/down keys to change the date part, but doesn't get validation. When there is a validation error an exception is thrown the following binding errors is in the Output View:

                                    System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Value.Date; DataItem='RowData' (HashCode=36510679); target element is 'DateEdit' (Name=''); target property is 'EditValue' (type 'Object') IPSException:'Hvcc.Ips.Common.Service.IPSException: Departure time cannot be eariler than Arrival time!
                                       at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
                                       at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
                                       at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
                                       at System.Windows.Data.BindingExpression.UpdateSource(Object value)'

                                    Arrival Time cell template

                                    [XAML]
                                    <devexpress:DateEdit x:Name="PART_Editor" EnableSpinOperation="True" MaskType="DateTimeAdvancingCaret" MaskUseAsDisplayFormat="True" Mask="{x:Static common:CommonConstant.DateTimeFormat}" />

                                    Departure Time content template

                                    [XAML]
                                    <dxprg:PropertyDefinition Path="DepartureData" ShowEditorButtons="True" IsReadOnly="{Binding SelectedObject.ReadOnly, ElementName=PropertyGrid}" UseTypeConverterToStringConversion="True"> <dxprg:PropertyDefinition.ContentTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <devexpress:DateEdit EnableSpinOperation="True" EditValue="{Binding Path=Value.Date, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, ValidatesOnDataErrors=True}" MaskUseAsDisplayFormat="True" Mask="{x:Static common:CommonConstant.DateTimeFormat}"/> <TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Text="{Binding Path=Value.Offset, UpdateSourceTrigger=PropertyChanged}"></TextBlock> </StackPanel> </DataTemplate> </dxprg:PropertyDefinition.ContentTemplate> </dxprg:PropertyDefinition>

                                    Thanks.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,
                                 
                                Thank you for the detailed description.
                                 
                                We intentionally disabled this functionality for in-place editors since the Up and Down keys are supposed to change the grid's focus/selection. To enable it, you can handle keyboard events at the grid level and invoke https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEdit.SpinUp%5D(https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEdit.SpinUp)">SpinUp/https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEdit.SpinDown%5D(https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEdit.SpinDown)">SpinDown for an active cell editor.
                                I have attached a sample demonstrating this approach in action.