Version

KeyMatchingEnforced Property

Gets/sets whether the Key property must match the data item provider's key when assiging the FieldLayout to the associated DataRecord.
Syntax
'Declaration
 
Public Property KeyMatchingEnforced As Boolean
public bool KeyMatchingEnforced {get; set;}
Remarks

When assigning a FieldLayout to a DataRecord the FieldLayouts collection is searched for the most approprate match to the data item. Setting this property to true will exclude a FieldLayout from matching the data item unless its key is a match for the Infragistics.Windows.Internal.PropertyDescriptorProvider's Infragistics.Windows.Internal.PropertyDescriptorProvider.Key. However, even if KeyMatchingEnforced is true and the Key doeesn't match this does not prevent the FieldLayout from being explicitly assigned to a data item in code within the AssigningFieldLayoutToItem event.

Note: in version 9.2 (NA 2009 volume 2) we changed the default value of the Key. Unless explicitly set it is now initialized from the Infragistics.Windows.Internal.PropertyDescriptorProvider's Infragistics.Windows.Internal.PropertyDescriptorProvider.Key. This was done to make the keys more xaml friendly. The following table describes how the changes affect various data sources:

  • "Prior to v.9.2 the key was the System.Data.DataTable instance. As of v9.2 the Key is now the DataTable.TableName."
  • "Prior to v.9.2 the key was the data source instance. As of v9.2 the Key is now what is returned from the System.ComponentModel.ITypedList.GetListName() method."
  • "Prior to v.9.2 the key was the System.Xml.XmlNode instance. As of v9.2 the Key is now the XmlNode.Name."

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also