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

RadGrid maintain scroll position after row selection

9 Answers 656 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 28 Apr 2015, 02:38 PM

I have a RadGrid that has a WebUserControl for each row of the grid to allow the user to edit that row. When I click the edit button to expand the row (this opens up a .ascx control within the grid for that row), it always scrolls to the top of the page. The user then has to scroll down to find the row they selected with the row expanded to begin editing that row.

 I found in another post that adding RadGrid1.ClientSettings.AllowKeyboardNavigation = true;prior to data binding the grid helps to maintain scroll position. This kind of works and you only have to scroll down one click of the mouse wheel to find the row to edit; not good enough.

I also have set MaintainScrollPositionOnPostback=“true" on the aspx page.

I also have set on the RadGrid itself under client settings SaveScrollPosition=“true".

What I'd like to see is the page not move at all when the user clicks on edit for the given row. I would like to maintain the scroll position on the page.

Can this be accomplished? If so, how?

9 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 29 Apr 2015, 04:39 PM
Hello,

I have prepared a sample page where I set the MaintainScrollPositionOnPostback property of the Page to true and as you can see the browser scroll maintain its position when I click edit. You can find my test page attached to this message and modify it in order to replicate the described problem, so we can investigate the case further.

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Shawn
Top achievements
Rank 1
answered on 01 May 2015, 03:52 AM

Pavlina thank you for the demo project.  I tried out your product and I'm sad to say that it does not maintain scroll position.  I scrolled down the page, clicked edit and after postback I'm back at the top of the page.  I tried in the latest version of Chrome, Firefox and IE11.

 

Thoughts???

0
Pavlina
Telerik team
answered on 05 May 2015, 09:17 PM
Hi,

Could you specify which is the version of Telerik UI controls you are using to test the scrolling? I tested the attached project with the latest version of the controls and the scrolling maintain after edit is clicked.

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Shawn
Top achievements
Rank 1
answered on 07 May 2015, 01:24 PM
I'm using a product version for the Telerik.Web.UI.dll of 2014.3.1209.45.  I will try the latest version and let you know if that works.  Thanks,
0
Pavlina
Telerik team
answered on 07 May 2015, 03:25 PM
Hi,

If the problem in your application persists even with the latest version, isolate it in a sample project or modify the one I sent you in order to replicate the issue and send it to us. We will test it locally and will advice you further how to resolve it.

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Shawn
Top achievements
Rank 1
answered on 08 May 2015, 12:52 AM

I tried the latest and still jumps me to the top of the page.  I'm using the Northwind DB from a sql perspective instead of a file like you provided.  Check the web.config and change accordingly.  How can I send you the zipped file?

 

Thanks,

0
Pavlina
Telerik team
answered on 11 May 2015, 01:55 PM
Hi,

In order to persist the scroll position you can follow the approach described here: http://www.aspsnippets.com/Articles/Maintain-Scroll-Position-of-DIV-on-PostBack-in-ASPNet.aspx

The idea is to store the scroll position in a hidden field and reapply it after the postback. Give it a try and in case this solution is also not working for you, open a formal support ticket where you will be able to attach zip file and send it to us.

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Shawn
Top achievements
Rank 1
answered on 11 May 2015, 04:12 PM
I submitted ticket 934177.  Thanks
0
Pavlina
Telerik team
answered on 12 May 2015, 03:01 PM
Hello,

To prevent multiple posts let's continue our conversation in the support ticket.

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Shawn
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Shawn
Top achievements
Rank 1
Share this question
or