Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2070
Changing grid rows per page dynamically (AJAX way)
posted

I have a dropdown combo box on my web page that lets the user 'pick' the number of lines per page they want to see on a WebDataGrid at one time. This helps with long (and short) lists so the user is not swamped with lots of rows or lots of pages - they can choose for themselves.

Right now, of course, it causes a full postback, when then sets the grid lines per page (via code behind) and resets the data in the grid. Is there a way I can use some JavaScript to 1. Get the number from the dropdown, 2. Set the WebDataGrid's row per page to that value, and 3. Cause the WebDataGrid to do an AJAX post back so the data gets refreshed. (or is this even needed?)

Any JavaScript example would be helpful, along with any tips. Thanks in advance!

/Tom