RadDatePicker tooltip on validation error from viewmodel

2 posts, 0 answers
  1. Andy
    Andy avatar
    3 posts
    Member since:
    Nov 2010

    Posted 23 Dec 2010 Link to this post


    I'm trying to set the tooltip on the RadDatePicker when I get a validation error from my viewmodel.

    <Trigger Property="Validation.HasError"Value="True">
    <Setter Property="FrameworkElement.ToolTip"
                                     Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem, Converter={StaticResource edenValidationErrorToolTipConverter}}"
                                        TargetName="PART_DateTimeInput" />

    No matter  what I try, I can't seem to update the tooltip.


  2. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 28 Dec 2010 Link to this post

    Hi Andy,

    In case your RadDatePickers are data bound, you have to defined the binding expression to throw an exception in case of invalid input date:

                    <Binding Path="SelectedDate" ValidatesOnDataErrors="True"
                            <ExceptionValidationRule />
                      <DataErrorValidationRule />

    All the best,
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. DevCraft R3 2016 release webinar banner
Back to Top