Ticket T348355
Visible to All Users

GridControl doesn't correctly apply cell templates when scrolling horizontally

created 9 years ago

[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

Comments (3)
DevExpress Support Team 9 years ago

    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.

    DT DT
    deepthi thota 1 8 years ago

      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

      Alex Chuev (DevExpress) 8 years ago

        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

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.