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

ScrollToVerticalOffSet don´t change the state of grid after call CellEditEnded

1 Answer 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kronnos_indigo
Top achievements
Rank 2
kronnos_indigo asked on 13 Jun 2011, 10:47 PM
Good afternoon Team Telerik

I have a next case (T 2011 Q1 Sp1, VST 2010, SQL 2008, MSF 4.0).
0. In global variables of Page I define:
Dim var_scroll As GridView.GridViewScrollViewer
Dim pos_scroll(2) As Double   ' pos_scroll(0) = horizontal; pos_scroll(1) = vertical;  pos_scroll(2) = rowIndex Edited

1. I edit one cell of a register and finish the edition, the grid call "CellEditEnded"
1.1 Evaluate if have a new value is not equal to old value. If yes, I do:

If e.NewData <> e.OldData Then
        var_scroll = rgvRegistroTabla.ChildrenOfType(Of GridView.GridViewScrollViewer).FirstOrDefault
        pos_scroll(0) = var_scroll.HorizontalOffset
        pos_scroll(1) = var_scroll.VerticalOffset
        pos_scroll(2) = GetCellRowIndex(rgvRegistroTabla, e.Cell)
         
         .... Code to save the changes ...
end if

2. In "DataLoaded" of grid I put the next line but it no change the state and after recall grid it stay in top data:
If Not IsNothing(var_scroll) Then
        var_scroll.ScrollToVerticalOffset(pos_scroll(1))
        var_scroll.ScrollToHorizontalOffset(100)
End If
 BUT I DON´T ANY CHANGE IN GRID AND STAY AT TOP A LEFT POSITION OF ITEMS. I want that grid stay in the scroll position to register that  was edited

I made also in Data_Loaded:  rgvGrid.ChildrenOfType(Of GridView.GridViewScrollViewer).Item(0).ScrollToEnd()
but nothing.

am I do any thing bad?

thanks for any help

Juan Pablo Díaz 
Bogotá - Colombia.

pd. I see other similar Post but I don´t understand why my page don`t made nothing

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 16 Jun 2011, 04:55 PM
Hi kronnos_indigo,

I have tried to reproduce your scenario, creating a WCF RIA services silverlight application that loads data into a RadGridView, using 2011.1.419 binaries. Unfortunately I have never faced any issues with GridViewScrollViewer's methods. Please, refer to it and let me know if your approach is any different from mine.

All the best,
Ivan Ivanov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
kronnos_indigo
Top achievements
Rank 2
Answers by
Ivan Ivanov
Telerik team
Share this question
or