Custom Error message when args.IsParsingSuccessful = false;

3 posts, 0 answers
  1. Wilfred
    Wilfred avatar
    4 posts
    Member since:
    Feb 2017

    Posted 27 Sep Link to this post

    Hi,

    Wondering if there's a way to override the default error message, "Error" when args.IsParsingSuccessful is set to false in the ParseDateTimeValue event handler. Would like to provide something more descriptive to my users.

    Thanks

  2. Kalin
    Admin
    Kalin avatar
    1279 posts

    Posted 29 Sep Link to this post

    Hi Wilfred,

    The control provides ErrorTooltipContent property - you could modify it in the event handler as desired once the parsing is not successful:
    private void RadDateTimePicker_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
    {
        (sender as RadDatePicker).ErrorTooltipContent = "Another Error";
        args.IsParsingSuccessful = false;
    }

    Hope this helps. If you have any other questions or concerns, please let us know.

    Regards,
    Kalin
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Wilfred
    Wilfred avatar
    4 posts
    Member since:
    Feb 2017

    Posted 29 Sep Link to this post

    Exactly what I was looking for. Was looking at properties of the wrong control.

     

    Thanks!

Back to Top