This is a migrated thread and some comments may be shown as answers.

Validation Result not shown

1 Answer 200 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Heiko Görig
Top achievements
Rank 1
Heiko Görig asked on 18 Apr 2011, 06:00 PM
Hello,

I have a RadDatePicker whose SelectedValue is bound to a property of an object which implements IDataErrorInfo:

<telerik:RadDatePicker

 

 

 

telerik:StyleManager.Theme="Office_Black"

 

DataContext="{Binding ReceiptDateField}"

 

SelectedValue="{Binding SelectedDate, Mode=TwoWay, ValidatesOnDataErrors=True}"

 

 

DateTimeWatermarkContent="" DisplayFormat="Short"

 

Margin="296,196,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="24" Width="84"/>

If validation failes the RadDatePicker only has a red border but no red triangle in the upper right corner. Therefore it's not possible to see the error info.
Could you please fix this bug.

Greetings

Heiko

1 Answer, 1 is accepted

Sort by
0
Accepted
Boyan
Telerik team
answered on 22 Apr 2011, 09:57 AM
Hi Heiko Görig,

Unlike Silverligth there is no out of the box tooltip for WPF RadDatePicker. You can create easily a tooltip that will show the error using this code.

<Grid.Resources>
    <Style TargetType="{x:Type telerik:RadDateTimePicker}">
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="ToolTip"
        Value="{Binding RelativeSource={RelativeSource Self},
               Path=(Validation.Errors)[0].ErrorContent}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
</Grid.Resources>

Hope this helps. If you have further questions please let me know.

Kind regards,
Boyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DatePicker
Asked by
Heiko Görig
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or