What listbox event should I use to set scroll position
-
05-07-2019 - |
Question
on my page, I have a listbox in an update panel. I am successfully trapping the scroll position, however when the update panel refreshes, I'm having trouble finding a suitable javascript event in which to call my function to set the scroll position. Any ideas?
i had really hoped that "onAfterUpdate" was going to work, but no...
Solution
After the request and UpdatePanel is finished you can tap into the PageRequestManager and fire your own delegate:
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args)
{
//your code here
}
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow