No ErrorTemplate ?

2 posts, 0 answers
  1. Laurent
    Laurent avatar
    2 posts
    Member since:
    Dec 2014

    Posted 20 Mar 2015 Link to this post

    It appears that RadTimePicker don't show anything (like red border and IDataErrorInfo.Error), is it normal ?

    I wrote :
        public partial class MyItem: IDataErrorInfo
        {
            public TimeSpan Duree { get; set; }

            public string this[string columnName]
            {
                get
                {
                    string result = null;
                    switch (columnName)
                    {
                        case "Duree":
                            if (Duree.Ticks <= 0)
                                result = "Un(e) Durée est requis(e)";
                            break;

                        default:
                            result = null;
                            break;
                    }
                    return result;
                }
            }

            public string Error { get; private set; }
        }

    <telerik:RadTimePicker SelectedTime="{Binding MyItemInstanced.Duree, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"

  2. Laurent
    Laurent avatar
    2 posts
    Member since:
    Dec 2014

    Posted 20 Mar 2015 Link to this post

    It's ok, sorry for this.
    The default binding mode on SelectedTime isn't "Mode=TwoWay"
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top