Klemen Novak
Top achievements
Rank 1
Klemen Novak
asked on 25 Aug 2010, 09:09 AM
Hi,
We have grids with client side data binding. Setting "SaveScrollPosition" property of "ClientSettings" either to true or false, scroll remains on the same position as set on the previous page while navigating pages in the grid. We want for each page to be scrolled to the top. Is there anything we can do to solve this issue?
Regards
4 Answers, 1 is accepted
0
Accepted
Hello Klemen,
Please use
Sincerely yours,
Dimo
the Telerik team
Please use
<
telerik:RadGrid
>
<
ClientSettings
>
<
ClientEvents
OnDataBound
=
"dataBound"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
function
dataBound(sender, args)
{
$get(sender.get_id() +
"_GridData"
).scrollTop = 0;
}
Sincerely yours,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Klemen Novak
Top achievements
Rank 1
answered on 31 Aug 2010, 07:42 AM
Hi Dimo,
Thanks for your reply but that didn't work for us. Unfortunately I have omitted that on the page we have combination of Ajax panels and rad splitter. I have created an example so you can have a closer look and posted it as a Support ticket.
0
Hi Klemen,
The RadSplitter and the RadAjaxLoadingPanel are not related to the problem. You have two different event handlers attached to the OnDataBound client event:
MyUsersgrid_DataBound (attached programmatically)
dataBound (attached declaratively)
Currently, only the MyUsersgrid_DataBound handler is executed, because it is attached second. The code, which resets the scroll position is in the non-executed handler. Please move the code to the correct handler and remove the unused one.
Kind regards,
Dimo
the Telerik team
The RadSplitter and the RadAjaxLoadingPanel are not related to the problem. You have two different event handlers attached to the OnDataBound client event:
MyUsersgrid_DataBound (attached programmatically)
dataBound (attached declaratively)
Currently, only the MyUsersgrid_DataBound handler is executed, because it is attached second. The code, which resets the scroll position is in the non-executed handler. Please move the code to the correct handler and remove the unused one.
Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Klemen Novak
Top achievements
Rank 1
answered on 31 Aug 2010, 12:44 PM
Hi Dimo,
How awkward...
Thanks
How awkward...
Thanks