I have a XDG set out with some standard fields, and I programmatically add hundreds or thousands of fields during runtime. XDG handles this very well with virtualization and etc. However, one problem is that it is not as simple as specifying a BindingPath because these values don't come from properties of the object, I have to manually specific the binding on each cell in the cellsinviewchanged event. I have tried binding to CVP's value, but this did not work, apparently the Value is not the actual value, but a wrapping object. Instead, I used a binding on the ValueEditor.Value property. This seems to have the desired effect.
However, one problem with this approach is that I *must* leave virtualization on for reasonable performance, but when editors are recycled, they assign back to my objects the value NULL. So when I am scrolling the datagrid, when cells are scrolled out of view, they apply null to all nullable objects that I've bound. This is a problem for things like strings where I want to be able to assign null, just not when they scroll out of view.
For my scenario, is there a best practices approach to solving the problem?
Hi,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Nevermind, binding to that value is not working. Many values become random or values in other cells when I scroll the datagrid.
I have turned off cell virtualization, and this solves the issue. However, with that many fields, I'm desiring a more performant approach.