This is a migrated thread and some comments may be shown as answers.

Synchronize GridView vertical offset with other control

1 Answer 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lorenz
Top achievements
Rank 1
Lorenz asked on 22 Oct 2015, 01:26 PM
Hi guys,

We are having some trouble with the RadGridView and its ExtentHeight property.
In our application, a RadGridView is displayed and can contain from 1 to 5000 rows.
Some of these rows have a specific state which affects the row style:
- Normal state => row background must be transparent
- Highlighted state => row background must be Red

To help user to identify quickly the highlighted rows, we are showing a "thumbnail view" left to the grid view.
This "Thumbnail view" shows a white vertical bar which contains Red rectangle for each highlighted rows. Over this vertical bar, a "Zoom Box" rectangle is displayed to indicate which part of the table is currently visible in the viewport (see image).

We are trying to synchronize the position of the "Zoom Box" with the Vertical Offset of the RadGridView. Right not it is more or less ok when using the mouse wheel (either in the RadGridView or in the "Thumbnail View").
But it's not working properly in the following case (Zoom Box is out of sync):
- Dragging TOO FAST the scrollbar position indicator (if the RadGridView was completely scrolled using the mouse wheel before, then it works)
- Clicking somewhere in the "Thumbnail View"

After analysis we think that this problem comes from the ExtentHeight property of the RadGridView.
As we understand at the beginning, the ExtentHeight property is estimated using the "real" height of each visible rows and the default height for all other rows.
Then when the RadGridView is scrolled, the ExtentHeight property is adjusted with the "real" height of each new visible row.

Is there a way to override the ExtentHeight of the ScrollViewer of the RadGridView ?
Or another way to accomplish this synchronization?

I have added a sample project.

Thanks for your assistance,
Kind regards,
BenoƮt

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Oct 2015, 11:49 AM
Hello Benoit,

Please note, that our ticketing system does not permit attaching archive files in a forum thread. For this purpose, you need to open a new support thread and attach the sample application in it.

As to the customization you are trying to achieve, I am afraid that it would not be possible, as the ExtentHeight property does not expose a setter.

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Lorenz
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or