Hello,
I am using XamDateTiemEditor with AutoFillDate=Year. When I enter now an incomplete date like "01.10." (for 1st october of the current year) I see following error in the output:
System.Windows.Data Error: 7 : ConvertBack cannot convert value '15.10.' (type 'String'). BindingExpression:Path=StartDatum; DataItem='vmArbeitseinteilung' (HashCode=27462382); target element is 'XamDateTimeEditor' (Name=''); target property is 'Text' (type 'String') FormatException:'System.FormatException: Die Zeichenfolge wurde nicht als gültiges DateTime erkannt.
Means = string is not recognized as correct datatime format
Interessting is that the value of the XamDateTimeEditor is already completed when the events EditModeEnding and EditModeEnded are firing. It is then a full DateTime with day, month and year.
Question: How do I get ride this error ?
Thanks
Niko
Hello Nikolaus,
Thank you for the update. There isn’t any code difference between nuget packages and a locally installed version. A difference in version could be the cause of the behavior you are seeing. You say you are using nuget but not which version. You should be able to check the version through the package manager. If you are not seeing v19.1 in your package manager it may not have access to that version. If you go to the following link and sign in what versions do you see:
www.infragistics.com/.../keys-and-downloads
Hello Mike,
I can confirm that the error does not show on your example. This means I need to look for reasons in my own code :-(
I noticed tow differences between my Infragistics files and yours:
1. Your version 19.1.20191.244 is not aviableable via nuget
2. The references in your example are called InfragisticsWPF4.v19.1 while mine via nuget are named only InfragisticsWPF
The question is what is the difference between getting the libs via nuget or as local install.
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I created a XamDateTimeEditor sample with AutoFillDate set to year and did not get an error filling in a partial date.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, then the change in behavior is due to differences in your environment from mine and these differences can be anything from operating system version to the specific version of the Infragistics DLL versions used. My test was performed using version 19.1.20191.244 in Infragistics for WPF 2019 Volume 1. Please provide more details about your machine and version of the assemblies that you are referencing so that I can modify the environment that I am testing in to match yours.
If the project does show the product feature working correctly, then more information will be needed to reproduce the issue in a sample that can be used for debugging. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. This can be done by either be done by making the sample that I provided more like your application or by isolating the behavior from your application by removing dependencies on any third parties or databases.
Please let me know if I can provide any further assistance.
XamDateTimeEditor.zip