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

Identify the top and bottom row index when the RadGridView is scrolled

2 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ludovic
Top achievements
Rank 1
Ludovic asked on 18 Nov 2015, 03:33 PM

Hi guys,

 

I use the RadGridView marginally, with a dynamic resizing of the cells height (with ctrl + mouse wheel), like this :

http://image.noelshack.com/fichiers/2015/47/1447859201-5988-noelpush.png

And I would like to get in my ViewModel the index of the row on the top and bottom of the view (Tstamp 23.285 (top) and 27.569 on my screenshot for the situation from the left).

 

I tried to use the ScrollPositionIndicatorTemplate but I would like a real time mode (if possible), I don't know how I can send the value to my ViewModel, and it is not very accurate anyway...

And I tried to use the ScrollChanged event (with a ScrollChangedEventArg parameter) sends wrong values. I can't use the VerticalOffset received, because it doesn't corresponds to the reality. I'm forced to go top of the RadGridView and scroll slowly all my GridView if I want receive a correct VerticalOffset (this technique updates virtualized values visibly). Can we refresh manually the "scroll values" after a modification of the height of the cells ?

Or is there a function that directly gives me these rows ?

 

I hope to have correctly explained the problem. Thanks for your help!

Regards.

2 Answers, 1 is accepted

Sort by
0
Ludovic
Top achievements
Rank 1
answered on 19 Nov 2015, 03:12 PM

Hi,

 

I didn't see that I was in the silverlight section. Is it possible to move my topic in the WPF section or do I recreate it ?

 

Regards.

0
Stefan
Telerik team
answered on 23 Nov 2015, 10:48 AM
Hello Ludovic,

I have switched the thread from the Silverlight to WPF section, as per your requirement.

Such customization is not supported out of the box by RadGridView. For finding a possible solution, I can suggest you taking a look at the Get visible rows returns more rows than visible and FirstVisibleChildIndex forum threads.

As for scrolling RadGridView, you can take a look at the Scroll to particular row or column help topic.

I hope that you will find these resources helpful for implementing the desired behavior of RadGridView.

Best 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
Ludovic
Top achievements
Rank 1
Answers by
Ludovic
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or