Gridview jumps back to first "page"

3 posts, 0 answers
  1. Pittco Management
    Pittco Management avatar
    6 posts
    Member since:
    Aug 2007

    Posted 07 Aug 2013 Link to this post

    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++)
    grid.DataSource = list;
    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. Pittco Management
    Pittco Management avatar
    6 posts
    Member since:
    Aug 2007

    Posted 07 Aug 2013 Link to this post

    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.
  3. Ivan Petrov
    Ivan Petrov avatar
    717 posts

    Posted 12 Aug 2013 Link to this post

    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.

    Ivan Petrov
    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