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
520
RetainDeactivatedContainersPermanently and scrolling
posted

Hi, 

We changed our grid to use RetainDeactivatedContainersPermanently a while back to improve reloading time. We change the datasource quite frequently so this setting makes sense. However, scrolling time seems to be affected for us. When users scroll the grid, it was not smooth and make them think it is slow. I did a profiling via dotTrace and saw the hotspot while scrolling was in OnContainerDiscarded (attached).

If you look in the call stack, you can see the stack has RemoveAllDiscardedContainer when Layout updated. This does not make sense as we already set to RetainDeactivatedContainersPermanently so we expect these containers to remain there forever.

Out of curiousity I set the grid to RetainDeactivatedContainers only and the scrolling was fast again. Of course we cannot use this as this make us have the problem with reloading grid again. The hot spot was gone. So it looks like RetainDeactivatedContainersPermanently  is still destroying containers while scrolling different from RetainDeactivatedContainers. Is this a bug? Is it a mattter of handling scrolling for RetainDeactivatedContainersPermanently in the same manner as RetainDeactivatedContainers 

Please advise. 

Thank you. 

  • 34810
    Offline posted

    Hello bachvudao,

    I have been investigating into this behavior that you are referring to with the RecordContainerRetentionMode, but at the moment, I cannot seem to reproduce the behavior that you are referring to in which the containers are deactivated while scrolling. When running against the source code of the XamDataGrid, I only see the OnContainerDiscarded method hit when the DataSource is changed. In the case of the "RetainDeactivatedContainersPermanently" option, I don't believe this is correct either, but from your description this appears to be happening during scrolling, which is a bit more of a pressing issue at the moment.

    I have attached the sample project I used to test this.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 16.2.20162.2109 in Infragistics for WPF 2016 Volume 2.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XDGDeactivatedContainersCase.zip