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

Gridview jumps back to first "page"

2 Answers 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pittco Management
Top achievements
Rank 1
Pittco Management asked on 08 Aug 2013, 02:04 AM
This is a very frustrating bug, and I can't get anywhere with it.  Let me try to explain the situation.  I've created a brand new project and form to demonstrate the issue.  But let me start by saying I have 20+ machines I can replicate this bug, but not on any of my development machines.  That alone makes this such a difficult situation to debug.

Load a grid with a bunch of data.
After it first loads, scroll down more than one "page" worth of data.
click on a row, and suddenly the grid will "jump" or "shift" back to the top.  The focus will be set to the row position equal to where you clicked.  So if I'm showing 10 records at a time, based on the size of the overall grid, and the height of the rows.  If I scroll so the 20th row is at top, and click on the 22nd row(2 from the top), it will jump to the 2nd row and set focus there.

So brand new form, brand new project with a button and gridview on it.  Then click event of the button has this code

FYI I'm currently using 2012.3.1017.20


list = new List<DateTime>();
DateTime date = DateTime.Now;
for (int i = 0; i < 10000; i++)
{
    list.Add(date.AddDays(i));
}
grid.DataSource = list;
grid.BestFitColumns();
public List<DateTime> list { get; set; }

Again, I can't get this to fail for me on my machine, but I certainly have many client machines in which it fails.

Any help would be much appreciated.  Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Pittco Management
Top achievements
Rank 1
answered on 08 Aug 2013, 02:19 AM
I forgot to mention.  If you can get it to fail, it will only fail on the first click.  Until you bind the data source again, it will work as expected.
0
Ivan Petrov
Telerik team
answered on 12 Aug 2013, 09:51 AM
Hello Pittco,

Thank you for writing.

I tried to reproduce the behavior you have described but I was not able to. I tried every setup I could think of but to no avail. I tried both Debug and Release modes, targeting .Net 2.0 and 4.0 in my project
(with the 2.0 Telerik assemblies as you have stated you are using), binding the grid on a button click/the form constructor/OnLoad/OnShown. No combination of the above conditions led to the issue you are experiencing. 

If you have access to the 20 machines you can reproduce the issue on, I would suggest you try your sample project with a new version of the controls and test if the issue is still present. Alternatively if you find a way to reproduce the issue you can send me a project so I can help you.

Looking forward to your reply.

Regards,
Ivan Petrov
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 >>
Tags
GridView
Asked by
Pittco Management
Top achievements
Rank 1
Answers by
Pittco Management
Top achievements
Rank 1
Ivan Petrov
Telerik team
Share this question
or