Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DatePicker > Validation Result not shown

Answered Validation Result not shown

Feed from this thread
  • Posted on Apr 18, 2011 (permalink)

    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

    Reply

  • Answer Boyan Boyan admin's avatar

    Posted on Apr 22, 2011 (permalink)

    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DatePicker > Validation Result not shown
Related resources for "Validation Result not shown"

WPF DatePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]