Synchronize scrollbars in grid hierarchy levels

1 Answer 127 Views
GridView
Oscar
Top achievements
Rank 1
Oscar asked on 02 Nov 2022, 10:02 AM

Hello,

In order to sincronize horizontal scrollbars in GridView we are using the source code of the following article:
https://docs.telerik.com/devtools/winforms/knowledge-base/synchronize-scrollbars-in-hierarchy-levels

The thing is that we have tried this code in an empty project with an empty grid with 11 columnas, 30 rows and still 0 child rows and when I move the scroll bar there is too much lag.

The code line that causes the lag is: this.radGridView1.MasterTemplate.Refresh(); in the HScrollBar_ValueChanged method but it's the line that makes everything work.

Is there any way to imporve this or any new method that we can implemente since the article was made in 2018 so there may be there ways to do it.

Thank you and regards.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Nov 2022, 01:38 PM

Hello, Oscar,

RadGridView doesn't offer horizontal scrolling synchronization of its hierarchical levels out of the box. However, the demonstrates approach shows how it is possible to achieve such functionality. But it comes at its price.

As it is mentioned in the referred KB article, since we force refreshing the grid control when scrolling, it may affect the scrolling performance depending on the number of columns that you have. Hence, the observed behavior is expected due to the available columns even though no rows are added to the child level.

This approach is still valid and I am afraid that I can't suggest a better solution for the required functionality.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Oscar
Top achievements
Rank 1
commented on 03 Nov 2022, 09:00 AM

Thanks for the quick answer!
Tags
GridView
Asked by
Oscar
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or