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

3 posts, 0 answers
  1. Ludovic
    Ludovic avatar
    9 posts
    Member since:
    Oct 2015

    Posted 18 Nov 2015 Link to this post

    Hi guys,


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

    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!


  2. Ludovic
    Ludovic avatar
    9 posts
    Member since:
    Oct 2015

    Posted 19 Nov 2015 in reply to Ludovic Link to this post



    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 ?



  3. Stefan
    Stefan avatar
    794 posts

    Posted 23 Nov 2015 Link to this post

    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,
    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
Back to Top