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

[Solved] keep scroll position

2 Answers 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 06 Sep 2009, 06:35 AM
Hi,

I have a grid that binds to a dataset with approx. 100 rows and 40 columns.  I'm NOT using paging for this application for a number of reasons.  The grid shows 10 rows vertically and 12 columns horizontally.  So, users scroll vertically and horizontally to view the data.  I also have columns 1 to 3 set as "frozen" columns.

As an example, the user may scroll right to see columns 20-27 (along with frozen columns 1 to 3) and then scroll down to see rows 20-30.  At that time, the user selects row 25 (row click  action) from the grid.  The row is highlighted.  Through the ItemComand event, the application displays the data (columns) for the row in a separate "edit" panel (an AJAX action).  User then edits data of the row in the "edit" panel, clicks a SAVE button (a postback action) to save the changes.  The changes are then written to the database; a fresh dataset is retrieved from the database and the grid is re-bound to the dataset.  Relatively simple.  Eveything works as planned. 

Questions:

1.  At the end of the postback action, the grid is refreshed and naturally the grid now goes back to the top, i.e. row 1 and columns 1 to 10.  I would like to keep the grid's previous scroll position (both veritical and horizontal), so that the user sees the grid just as prior to the edit action, i.e. in this example, grid would display rows 20 to 30, columns 20 to 27, with row 25 highlighted.  How do I accomplish that?

2. A related question:  I have enabled column resizing.  However, I find that the the "<--> drag to resize icon" doesn't always show up when and where I'd expect it to.  For most columns, it shows when the mouse hovers over the column divider in the header (normal behavior I believe).  For some columns, this doesn't work.  In those cases, I have to move the mouse around and sometimes it would show when the mouse hovers at the bottom of the column header and sometimes it wouldn't show at up.  The behavior is inconsistent.  Users will get very confused and frustrated with this.  Does anyone have an explanation or solution for this?

Thanks for any advise.

Barry

2 Answers, 1 is accepted

Sort by
0
Barry
Top achievements
Rank 1
answered on 08 Sep 2009, 07:28 AM
Just want to update my last posting:

Question #1: It appears the solution is by simply adding SaveScrollPosition="True" to the ClientSettings in the aspx file.

Question #2 is still outstanding.

Thanks.

Barry 

0
Pavlina
Telerik team
answered on 08 Sep 2009, 08:26 AM
Hello Barry,

I tried to replicate the issue using this online demo of the product but to no avail. Can you please provide a live url where the erroneous behavior can be seen? Additionally, verify that you are using the latest release 2009.2.826 of RadControls for ASP.NET AJAX in your project.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Barry
Top achievements
Rank 1
Answers by
Barry
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or