Hey Telerik,
this has probably been answered before but none of the fixes I found seemed to work.
Basically I have a 3 grids in one page and they have quite a bit of data. When I sort/filter a certain column or update a row,
the page does a postback and goes all the way to the top.
I tried MaintainScrollPositionOnPostback in the aspx page, I tried to set it in the page load and also in the web.config but that didn't work.
I also tried using javascript by having a 'onscroll' event. I tried that on document, window and the wrapping div and the event never got triggered.
The event gets triggered with onmousewheel though, but that wont work with the scrollbar/touchscreen, which I also need.
Is there a way to do a local postback or maybe change something in the grids to prevent going back to the top?
Thanks!
this has probably been answered before but none of the fixes I found seemed to work.
Basically I have a 3 grids in one page and they have quite a bit of data. When I sort/filter a certain column or update a row,
the page does a postback and goes all the way to the top.
I tried MaintainScrollPositionOnPostback in the aspx page, I tried to set it in the page load and also in the web.config but that didn't work.
I also tried using javascript by having a 'onscroll' event. I tried that on document, window and the wrapping div and the event never got triggered.
The event gets triggered with onmousewheel though, but that wont work with the scrollbar/touchscreen, which I also need.
Is there a way to do a local postback or maybe change something in the grids to prevent going back to the top?
Thanks!
6 Answers, 1 is accepted
0
Mark
Top achievements
Rank 1
answered on 16 Dec 2014, 02:35 PM
Does anyone have anything ?
It's due for next monday so I really need to fix this.
It's due for next monday so I really need to fix this.
0
Accepted
Hi Mark,
You can achieve this requirement by ajaxifying the grids:
Hope this helps. Please give it a try and let me know about the result.
Regards,
Eyup
Telerik
You can achieve this requirement by ajaxifying the grids:
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
Hope this helps. Please give it a try and let me know about the result.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Mark
Top achievements
Rank 1
answered on 17 Dec 2014, 03:26 PM
Alright, it does work I just tried it.
The only problem now is that in each of my rows I can click a link that opens a report and another one that opens a RadWindow.
Since I added the RadAjaxManager, they won't open anymore.
The only problem now is that in each of my rows I can click a link that opens a report and another one that opens a RadWindow.
Since I added the RadAjaxManager, they won't open anymore.
0
Mark
Top achievements
Rank 1
answered on 17 Dec 2014, 03:33 PM
EDIT of my previous post:
Clicking on an item's link button triggers a server event that does a bit of logic to get data and then:
Telerik.Web.UI.RadWindow newWindow = new Telerik.Web.UI.RadWindow();
newWindow.NavigateUrl = "PODetailsNew.aspx";
newWindow.VisibleOnPageLoad = true;
newWindow.Width = 1000;
newWindow.Height = 750;
rwmPODetails.Windows.Add(newWindow);
Clicking on an item's link button triggers a server event that does a bit of logic to get data and then:
Telerik.Web.UI.RadWindow newWindow = new Telerik.Web.UI.RadWindow();
newWindow.NavigateUrl = "PODetailsNew.aspx";
newWindow.VisibleOnPageLoad = true;
newWindow.Width = 1000;
newWindow.Height = 750;
rwmPODetails.Windows.Add(newWindow);
0
Mark
Top achievements
Rank 1
answered on 18 Dec 2014, 08:10 PM
Okay so another update, I added the RadWindowManager to the AjaxUpdatedControls, which worked to open the RadWindows.
Concerning the Javascript to open the Report I used RadAjaxManager.ResponseScripts.Add(''the script'');
Only one more concern now:
The RadWindow still opens at the top of the page but the page stays at the scrolled position
This can be a problem since there are 4 grids and you can scroll to a point where you wouldn't see the RadWindow when it is displayed
Concerning the Javascript to open the Report I used RadAjaxManager.ResponseScripts.Add(''the script'');
Only one more concern now:
The RadWindow still opens at the top of the page but the page stays at the scrolled position
This can be a problem since there are 4 grids and you can scroll to a point where you wouldn't see the RadWindow when it is displayed
0
Hi Mark,
You can use the client-side event handlers of the manager and try to apply the center or moveTo methods when the window is shown:
http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html
That should do the trick.
Regards,
Eyup
Telerik
You can use the client-side event handlers of the manager and try to apply the center or moveTo methods when the window is shown:
http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html
That should do the trick.
Regards,
Eyup
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.