[DevExpress Support Team: CLONED FROM KA18635: How to avoid problems with the DXGrid virtualization mechanism]
Hi,
We have a weird issue with the Virtualization.
We have several columns, half with CellTemplate = cellTemplate1 and the rest with cellTemplate2. Only columns with cellTemplate2 has the converter.
When we move horizentally to the end (to columns with cellTemplate2) and go back the columns that are using the cellTemplate1 we get to the converter of cellTemplate2 with column that is using cellTemplate1 (which doesn't have a converter at all).
If we set the virtualization to false everything works. We use the virtualization as true since it works very good with performance.
What is going on here, could be that when you change the columns data, you forget to set the cellTemplate?
Best regards,
Chen
Hi Chen,
It is difficult to diagnose the issue based only on the provided information. Would you please send us a sample project that we can use to replicate this issue? This way, we will be able to research it and determine the cause.
Hello Alex and Chen,
I am not sure if this issue is resolved, but it is most likely caused by the fact that under databinding, with virtualization activated (specifically a "recycling" approach), the context of the item has to be updated as the view scrolls. Otherwise, the viewable items will be reused which will have context for different rows / columns resulting in the behavior witnessed by Chen.
Regards,
Donald
Hi guys,
It is possible that new data is assigned to a reused cell element before the required cell template content is created when the grid is scrolled horizontally. As soon the cell data is updated, the binding in the old cell template content calls the IValueConverter.Convert method. In this case, there is nothing to worry about, since cell bindings will be re-evaluated when new cell template content is created.
Thanks,
Alex