Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Calendar > RadCalendar.IsValidFirstDayOfWeek - throw exception

Not answered RadCalendar.IsValidFirstDayOfWeek - throw exception

Feed from this thread
  • ppti avatar

    Posted on Feb 15, 2011 (permalink)

     

     

     

    RadCalendar c = new RadCalendar();
    c.FirstDayOfWeek = null;

    See the method (RadCalendar.):

    private static bool IsValidFirstDayOfWeek(object value)
    {
        DayOfWeek? nullable = (DayOfWeek?) value;
        return (Enum.IsDefined(typeof(DayOfWeek), nullable) || !nullable.HasValue); // ???
    }

    I getting "throw ArgumentNullException: Value cannot be null.Parameter name: value"

    Maybe code change to:

    private static bool IsValidFirstDayOfWeek(object value)
    {
        DayOfWeek? nullable = (DayOfWeek?) value;
        return (!nullable.HasValue || Enum.IsDefined(typeof(DayOfWeek), nullable.Value));
    }

    Its really working without exceptions!

    Reply

  • Kaloyan Kaloyan admin's avatar

    Posted on Feb 17, 2011 (permalink)

    Hello ppti,

    We will fix the issue shortly. Thank you for bringing to our attention.

    Regards,
    Kaloyan
    the Telerik team

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Calendar > RadCalendar.IsValidFirstDayOfWeek - throw exception
Related resources for "RadCalendar.IsValidFirstDayOfWeek - throw exception"

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