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
LoadCustomizations not working for certain RecordContainerGenerationModes
posted

In order to get the best performance optimizations out of the XamDataGrid, I'm told I should use the default RecordContainerGenerationMode (Recycle).

However, one reason I had been using another generation mode (PreLoad) is because it gave me well-defined and predictable behavior where SaveCustomizations() and LoadCustomizations() is concerned.


Those methods always behave well with a PreLoad XamDataGrid, as long as the grid has been loaded, and layouts have been initialized, and the dispatcher queue is relatively empty.  However, now that I'm trying to use "Recycle" again (thereby fixing many general-purpose layout performance issues) I'm struggling with the customization problems once again (the ones that had sent be over to "PreLoad").

Attached is an example.  Note that I do customizations as a very LAST step after:

  • Window Loads
  • XamDataGrid Loads
  • All Layouts are Initialized
  • All Dispatcher Operations are Complete
  • Send something to dispatcher on ContextIdle

I did this as the very LAST step, to try to give customizations the best possible chance to work properly but they still don't.  Note that the customizations are applied correctly to the FieldLayout in view (TopMovie), but another FieldLayout that is *not* in view yet is totally misconfigured (OtherMovie).  Both of them should have the same customizations  applied.

In order for both FieldLayouts to be customized properly, change the RecordContainerGenerationMode to "PreLoad".  You will see that there are three fields being customized ("MovableFields").  One "MoveableField" is hidden and the other two have their column positions exchanged.

Please let me know if there are questions about how the attached example is intended to behave.

 

CustomizationConcerns.zip
Parents
No Data
Reply
  • 2150
    Offline posted

    After considering this a bit more last night, I'll probably need to report a support case. 

    As far as I can tell, there isn't any valid reason why one layout should behave one way and the other layout a different way, despite getting the same field layout customizations.  It might be understandable if one of the FieldLayouts had not yet been fully "initialized"  but, insofar as both of the FieldLayouts are concerned, they already fired all their initialization events and are "good-to-go" - or at least they don't have any other public fields, events or property changes which say otherwise.   The only difference between the two FieldLayouts in my sample (ie between one that was customized properly and the one that was not) is the movement of the vertical scrollbar.  The scrollbar has not yet made both of them visible.  That seems pretty fragile.

    I'm eager to hear if anyone on this forum has any workaround.  Ideally I'd be able to keep the "Recycle" mode.  But I'm hoping there is a way to trigger a one-time "PreLoad" , in a manual way, when the xamdatagrid is first constructed.  That should allow my customizations to (properly) take effect.

    Any help or feedback would be appreciated.  I'm hoping to migrate a particular XamDataGrid from the "PreLoad" to "Recycle" mode, and push it to production within three weeks or so.  It will be a welcome change, since the "Recycle" mode is a lot more responsive to user interaction with editable data.

Children