Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2150
KeyMatchingEnforced ignored nowadays?
posted

I am having trouble with fieldlayouts in xamDataGrid where AutoGenerateFields is False.

 

Basically the grid is picking out a random field layout from my xaml for a nested relationship (hierarchy of related rows beneath a row).

 

I thought I could avoid the very undesirable behavior (random selection of a field layout) by using KeyMatchingEnforced="True" on all or one of the unmatching fieldlayouts.  However, despite a clearly mismatching Key value on the random fieldlayout in question, the xamDatagrid is still picking it out for use.


Reading the KeyMatchingEnforced property documentation, there is a "Note:" for version 9.2.  Am I correct in assuming that this note is a caveat that implies KeyMatchingEnforced no longer works properly?  (ie. possibly for compatibility reasons or such)

 

 

Parents
  • 14517
    Offline posted

    Hello,

    The XamDataGrid should only be selecting FieldLayouts where all of the Bound Fields have names equivalent to properties in the underlying object. If you have multiple field layouts that may match but want to ensure the correct one is selected then you should set the Key of that Field Layout to the name of the underlying object in the collection for that layout. If this is not working correctly for you can you please provide a simple sample illustrating the issue or provide more information on the type of data source you are using along with the objects in the collections and an example of the field layouts so I can look into your issue further.

    Sincerely,

    Valerie

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

Reply Children