I have a dataTable and I am using scrollBar if the records exceed ,lets say 20. The problem is after post back the div scroll bar goes to top. Is there anyway I can fix the resetting of scroll of div after post back. Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get and set the element’s current scroll position in Javascript using
element.scrollTop. Make use of the form’sonsubmithandler to save it as a hidden input element:with this function
This way it’s available as request parameter with the name
formId:scrollPos. You can use Javascript to set it during onload:Here the
divIdis obviously the ID of the<div>you’d like to scroll.