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

Page shifts when I edit Grid Item

3 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Asad
Top achievements
Rank 1
Asad asked on 10 Feb 2014, 10:28 AM
Hello! I am facing a problem that when I click on the Grid Item to edit, after the post back the page shifts to the top and does not focus on the row which I have clicked for the editing. Please give me the solution and thanx in advance. 

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Feb 2014, 03:25 AM
Hi Asad,

You can either add the MaintainScrollPositionOnPostback="true" setting to the page directive or AJAXify the Grid through RadAjaxManager to maintain the scroll position on postback.

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" MaintainScrollPositionOnPostback="true" . .  %>
 
// or
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Thanks,
Princy
0
Asad
Top achievements
Rank 1
answered on 11 Feb 2014, 07:41 AM
thank you I have tried this but its still not working.
0
Princy
Top achievements
Rank 2
answered on 12 Feb 2014, 03:44 AM
Hi Asad,

If you want to save scroll position of RadGrid control you can set ClientSettings->Scrolling->SaveScrollPosition property to true. If you mean vertical scroll-bar of the page you can specify MaintainScrollPositionOnPostback="true" in the page directive of the ASPX file.

ASPX:
<ClientSettings>
  <Scrolling AllowScroll="true" SaveScrollPosition="true" />
</ClientSettings>

Please try and let me know if any concern.

Thanks,
Princy
Tags
Grid
Asked by
Asad
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Asad
Top achievements
Rank 1
Share this question
or