У меня есть текущий код, где 2 DatePicker находятся в хранимых ячейках RadGridView.
<telerik:RadGridView AutoExpandGroups="True" AutoGenerateColumns="False" ColumnWidth="Auto" HorizontalAlignment="Left"
ItemsSource="{Binding entries, Mode=TwoWay}" Name="gridControl1" VerticalAlignment="Top"
RowIndicatorVisibility="Collapsed">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Width="0.2*" DataFormatString="{}{0:M/yyyy}" Header="{my:LocString ResourceKey=EntitySheet_OwnerShip_DisplayStartDate}" SortingState="Ascending">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<DatePicker x:Name="StartDateTimePicker" SelectedValue="{Binding StartDate,Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True,UpdateSourceTrigger=LostFocus}"/>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Width="0.2*" DataFormatString="{}{0:M/yyyy}" Header="{my:LocString ResourceKey=EntitySheet_OwnerShip_DisplayEndDate}" SortingState="Ascending">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<DatePicker x:Name="StartDateTimePicker" SelectedValue="{Binding EndDate,Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True,UpdateSourceTrigger=PropertyChanged}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
<i:Interaction.Triggers>
<i:EventTrigger EventName="PropertyChanged">
<cmd:EventToCommand Command="{Binding Path=ValidateStartDateCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem, ElementName=gridControl1}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadGridView>
Я хочу сравнить startDate с endDate и отобразить ошибку, если endDate
Заранее спасибо