RadDatePicker and RadDateTimePicker ToolTip display Error Message

3 posts, 0 answers
  1. Thiru
    Thiru avatar
    5 posts
    Member since:
    Sep 2012

    Posted 11 Nov 2014 Link to this post

    Hi Techies,

    I do not have any run time issue but when i load the screen, i am getting the Below error message in Custom Validation part.

    System.Windows.Data Error: 17 : Cannot get 'Item[]' value (type 'ValidationError') from '(Validation.Errors)' (type 'ReadOnlyObservableCollection`1'). BindingExpression:Path=(0)[0].ErrorContent; DataItem='RadDatePicker' (Name='EventStartDateTimePicker'); target element is 'RadDatePicker' (Name='EventStartDateTimePicker'); target property is 'ToolTip' (type 'Object') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

    I have to resolve this issue. Why this above error is displaying? Below i have given the Xaml Part. This is what i am using

    <tk:RadDatePicker Grid.Row="3" Grid.Column="0" TabIndex="2" Padding="3,2,0,0" 
    Width="85" Height="25" DateTimeWatermarkContent=" " FontSize="11.5" 
    x:Name="EventEndDateTimePicker" FontFamily="MyriadPro-Regular" 
    IsTooltipEnabled="False" SelectedValue="{Binding RelativeSource={RelativeSource 
    FindAncestor, AncestorType={x:Type UserControl}}, 
    TargetType="{x:Type tk:RadDatePicker}" BasedOn="{StaticResource 
    Property="Validation.HasError" Value="True"><BR><Setter Property="ToolTip" 
    Value="{Binding RelativeSource={RelativeSource Self}, 

    Please help me to get ride of this binding error on loading the screen.

    Thiruppathi V
  2. Yana
    Yana avatar
    4547 posts

    Posted 12 Nov 2014 Link to this post

    Hello Thiru,

    The error indicates some issue with the validation of the DatePicker value, however, without debugging the VIewModel where the validation logic is implemented, it is not possible for us to tell the exact reason. That's why I'd ask you to try to isolate the problem in a simple project and send it to us, so we to be able to test and debug it locally.

    Thanks you for your cooperation.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
  4. Thiru
    Thiru avatar
    5 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2014 in reply to Yana Link to this post

    Hi Yana's,

    Thanks for your reply.

    I have fixed this issue. I have used the binding like below.

    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" />

    Earlier, we have bound the Tooltip value like below.

    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).[0].ErrorContent}" />

    Thiruppathi V
Back to Top