Hi,
i guess this is a bug report for XamDataGrid.
I successfully displayed a row error using IDataErrorInfo.Error property setting FieldLayoutSettings.SupportDataErrorInfo to "RecordsAndCells".
Also the change notification with PropertyChanged(String.Empty) works.
BUT: It only works if AutoGenerateColumns is set to true. If it is set to false, the row error is still displayed. But the XamDataGrid won't react on the property change.
This does not really make sense to me.
Regards,
Karl-Michael Beck
Hi Karl-Michael,
I have been looking into the sample project that you have attached and have found the cause of the behavior you described. I initially noticed that the Error field’s PropertyChanged line never gets executed, which is the reason for the XamDataGrid not knowing there is an update. The reason this is caused only when the AutoGenerateFields is set to false is because, then no binding is created for the underlying object CRecord. If there is no binding the PropertyChanged is always null and no notification occurs. If you are to create on property that is to be bound to a Field the IDataErrorInfo will still work with the AutoGenerateFields set to false. I have modified your sample to illustrate this (DataErrorInfoProblem2_FIXED.zip)
Please let me know, if you require any further clarification on the matter.
Hello Petar,
here is the zip file. Set the aShowError variable to false to see it working. aShowError = True shows the error case.
Kind regards,
Karl-Michael
Hello KarlMichael,
Excuse me for the late reply, there seems to have some trouble with the community forum when you tried posting, which is now resolved. Please try and attach this again.
Looking forward to hearing from you.
i can not add a zip file. if i do so an unexpected error page is displayed.
sorry an unexpected error occured... will try it again.