C1FlexGrid scroll issuse

Posted by: dung.itcdt on 4 December 2023, 7:05 pm EST

  • Posted 4 December 2023, 7:05 pm EST

    When I scroll, the control doesn’t seem to refresh, leading to the same situation as in the video.

    I tried switching DrawMode but still the same.

    How do I fix this error?

    Version I’m using: 20231.596

    Scroll.rar

  • Posted 4 December 2023, 7:27 pm EST

    Hi,

    I reported a similar issue (but maybe not the same I fear) some time ago, and it was fixed in 20232.620: https://developer.mescius.com/forums/winforms-edition/net6-c1flexgrid-allowmergingfixed-and-rendering-issue

    Could you upgrade and check whether the problem disappears?

    Best regards

    Wolfgang

  • Posted 4 December 2023, 7:58 pm EST - Updated 4 December 2023, 7:58 pm EST

    Hi,

    I tried downloading the version as you instructed but still got the error. I’m using .NET Framework 4.8

  • Posted 4 December 2023, 8:20 pm EST

    Could you create a small standalone sample the reproduces the problem?

    Best regards

    Wolfgang

  • Posted 5 December 2023, 5:52 pm EST

    Hi Le,

    Thank you for sharing the video. Unfortunately, we could not reproduce the issue on our end. Could you please share a stripped-down version of your project or a sample project showing the issue you are facing? This will greatly help us in investigating the behavior further and assisting you better.

    We also suggest that you try your project with the latest version of C1FlexGrid available on NuGet (https://www.nuget.org/packages/C1.Win.C1FlexGrid/4.8.20233.631) and see if you still face the issue.

    @Wolfgang, thank you for your input!

    Best Regards,

    Kartik

  • Posted 11 April 2024, 9:34 pm EST - Updated 11 April 2024, 9:39 pm EST

    Hi Kartik,

    It seems that even in the example of C1, this issue persists. You can try running the FreezeBottom project and scroll down, at which point the rows appear to not be drawn.

    My computer configuration:

    • Display Resolution: 2560x1440
    • Scale: 150%

  • Posted 14 April 2024, 7:12 pm EST

    Hi,

    Thank you for sharing all the details. We could see the behavior you mentioned in the FreezeBottom product sample. However, it seems like an implementation issue, where the grid is not being updated correctly in the SynchScrollPosition method of the custom FlexFreezeBottom class. To fix this, please update the code as shown in the attached screenshot (see CodeReplace.zip)

    If your implementation is similar to the FreezeBottom product sample, please do the necessary changes to fix the behavior. If you are facing the issue with a different implementation, please provide a sample project reproducing the same, so we can investigate further and assist you better.

    Attachment: CodeReplace.zip

    Best Regards,

    Kartik

  • Posted 15 April 2024, 11:55 am EST

    Hi Kartik,

    Thanks for providing a fix for this issue, but it has some problems. Calling Refresh like this will redraw all the controls in the form, which is unnecessary because I’m only scrolling each grid. I think the problem lies in the behavior when scrolling that the grid does not call invalidate again, or it could be due to miscalculation of the timing of calling invalidate in the grid.

    I need to fix this issue directly within the C1.Win.C1FlexGrid dll, not outside the form, because the grid can be anywhere, on any form, and having to call Refresh again every time I scroll is not acceptable at all :slight_smile:

  • Posted 15 April 2024, 5:03 pm EST

    Hi,

    The FreezeBottom is not an inbuilt feature of the C1FlexGrid. It is a custom implementation which requires the scrolling of the two C1FlexGrids to be handled manually, which is why it requires to be Refreshed manually after scrolling. Also, this implementation calls the Refresh method of only the two C1FlexGrids and it won’t Refresh all the controls on the form.

    Note: Please note that the need to manual refresh after scrolling is specific to this custom implementation only and not when using the C1FlexGrid usually.

    If you are using the FreezeBottom implementation in your application, then please use the fix we suggested in our previous response. Else, if you are facing this rendering issue in a different implementation, please provide a sample project reproducing the same, so we can investigate further and assist you in the best way possible.

    Thanks, and Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels