Unable to scroll to last two rows of grid

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Jul 2013

    Posted 26 Jul 2013 Link to this post

    I'm using the following code to return to the current row after reloading my grid. Everything works fine except the grid won't scroll past the third row from the bottom. I'm using Ver: 2012.608.40 and don't have the option of upgrading at this time.

    For i As Integer = 0 To grdViewPayments.ChildRows.Count - 1 

        If grdViewPayments.ChildRows(i).Cells("PaymentID").Value.ToString() = selectedItem Then

     

            If i = 0 Then

                grdViewPayments.ChildRows(1).IsSelected = True

     

                grdViewPayments.ChildRows(1).IsCurrent = True

     

            End If

            grdViewPayments.ChildRows(i).IsSelected = True 

     

            grdViewPayments.ChildRows(i).IsCurrent = True

     

            grdViewPayments.TableElement.ScrollTo(grdViewPayments.CurrentRow.Index, 0

     

            Exit For

        Else

             grdViewPayments.ChildRows(i).IsSelected = False

     

     

        End If

    Next

  2. George
    Admin
    George avatar
    500 posts

    Posted 31 Jul 2013 Link to this post

    Hi David,

    Thank you for writing.

    I tested your scenario, but I find it hard to reproduce the described behavior since there are a lot of missing variables in the code you provided me with. On my end the following code scrolls to the last row with no problem:
    Me.radGridView1.TableElement.ScrollTo(Me.radGridView1.Rows.Count - 1, 0)

    Therefore, I am not sure where exactly the issue may be. That is why I would like to kindly ask you to provide me with a project which I can run locally in order to be able to provide you with adequate support. Please note that you have to open a new support ticket in order to be able attach your project.

    Thank you for your cooperation, looking forward to your reply.

    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top