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
860
Custom FieldLayout Not Applied To First Item
posted

Hello,

I have attached a sample that displays a problem a full project I have been working on is exhibiting.  I'm using an attached property behavior to set custom field layouts.  It gets applied... but only to the second and subsequent items.  It does not apply to the first item!

If I change "LabelLocation" to "InCell", all of them display the correct for that style, but this is not desired behavior for the full program (where there's about 20 fields with sub-layouts as well).

I'm also placing this grid inside a XamTabControl and getting an exception of "FieldLayout can not be moved to another DataPresenterBase." when it hits "target.FieldLayouts.Add( layout );" but I think I need instead to bind to FieldLayoutInitializing in there, so that is a problem I can investigate myself for now.

I look forward to any assistance you might be able to provide, thank you!

GridTesting.zip
Parents
No Data
Reply
  • 2180
    Offline posted

    Hi,

    I looked at the sample application that you provided, but I couldn’t find an issue. I don’t understand what exactly doesn’t apply on the first item and what do you mean by the first item – the first field, field layout, record or something else?

    Thanks,

    Diyan Dimitrov

Children