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
Well there are a few questions i'd ask because it does not seem very clean to me but it should work. ;-)
Hello KarlMichael,
I have modified the sample, so now it works as expected. Basically I used UnboundField’s BindingPath Property instead of Binding one and I also change the Name of the UnboundField, because when it is the same as the name of a property of the underlying object the grid doesn’t work properly.
Hope this helps you.
i had a look at the example but it doesnt fit my needs because i use unbound fields. I have modified the last example of peter to use unbound fields and the problem occurs again.
Kind regards,
kmb
Hello Karl-Michael,
Did you have the chance to look into the sample Peter attached (DataErrorInfoProblem2_FIXED), becasue it seems like that it works as you want. If it doesn't satisfies all your requirements, could please be more specific what do you want to achieve.
Looking forward for your reply.
I have an row error but i do not display the cell that's causing the error as a single grid column. That's why it will become difficult to assign the error to a cell.
As far as i see there is a event PRopertyChanged(String.Empty) which i think is for the row error. At least this is how i interpreted all the examples i saw with PropertyChanged(String.empty)
Independent of that a property change with an property name given should refresh the cell error.
I'm afraid this will result in a workaround to display a cell with 0 width and allow columnresize set to 0. Will this work?