<igDP:XamDataPresenter Name="xamDataPresenter1"> <igDP:XamDataPresenter.FieldLayoutSettings> <igDP:FieldLayoutSettings SupportDataErrorInfo="RecordsAndCells" /> </igDP:XamDataPresenter.FieldLayoutSettings> </igDP:XamDataPresenter>
You can enable support for the INotifyDataErrorInfo
or IDataErrorInfo
interface found in the .NET Framework by setting a FieldLayoutSettings object’s SupportDataErrorInfo property to a SupportDataErrorInfo enumeration value. When you enable support for the INotifyDataErrorInfo
or IDataErrorInfo
interface on a FieldLayoutSettings
object using the CellsOnly
or RecordsAndCells
enumeration value, you are enabling support for the INotifyDataErrorInfo
or IDataErrorInfo
interface on all fields in that field layout. However, you can set the SupportDataErrorInfo property exposed by a Field object’s FieldSettings property to False if you do not want a specific field to display errors. When you disable support for errors on a field, the HasDataError property exposed by all Cell objects and CellValuePresenter objects in that field will return False even if the data item contains an error for that field.
The following example code demonstrates how to enable INotifyDataErrorInfo
or IDataErrorInfo
interface support.
In XAML:
<igDP:XamDataPresenter Name="xamDataPresenter1"> <igDP:XamDataPresenter.FieldLayoutSettings> <igDP:FieldLayoutSettings SupportDataErrorInfo="RecordsAndCells" /> </igDP:XamDataPresenter.FieldLayoutSettings> </igDP:XamDataPresenter>
In Visual Basic:
Imports Infragistics.Windows.DataPresenter ... Me.xamDataPresenter1.FieldLayoutSettings.SupportDataErrorInfo = _ SupportDataErrorInfo.RecordsAndCells ...
In C#:
using Infragistics.Windows.DataPresenter; ... this.xamDataPresenter1.FieldLayoutSettings.SupportDataErrorInfo = SupportDataErrorInfo.RecordsAndCells; ...