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

How to scroll hierarchical grid row to top

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James James.Goodridge
Top achievements
Rank 1
James James.Goodridge asked on 29 Jan 2009, 10:50 AM
I have a 3 level hierarchical grid with scrolling enabled. Each row at the 3rd level has a hyperlink with a command name Edit.When clicked it displays an inline EditForm (usercontrol)  beneath the row. These can vary in content and height depending on the row selected. I have been asked to ensure that the EditForm is fully visible when it is displayed without the need for the user to scroll the grid manually. I have looked at your example about scrolling a selected row into view, but this is not really helping me.
The HierarchyLoad Mode is set to ServerOnDemand. I have a client method when clicking the LinkButton that registers an endRequest with the Sys.WebForms.PageRequestManager - this method is where I am trying to autoscroll.

Within our design framework we have methods to register ClientIds or values for utilisation by client code. I have been trying to use this to identify the row that was clicked. Maybe I should be doing this when the user clicks the LinkButton???

I would be grateful if you could point me in the right direction

Kind regards
James

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Feb 2009, 03:10 PM
Hi James,

Basically, you can use the build-in grid scroll and set its SaveScrollPosition property to true to ensure that the scroll position will be retained across postback/ajax requests as in this demo.

Another solution would be to ensure that the MaintainScrollPositionOnPostBack property through the Page directive is set to true (in case you do not take advantage of the built-in scrolling feature of the grid).

Alternatively, you may consider developing your custom solution (based on the 'Scrolling to the selected item' article) using the Update/Cancel buttons at the bottom of the WebUserControl custom edit form as pointers (controls that has to be in the visible area).

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
James James.Goodridge
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or