Check your query first. Once you have it as fast as you can get it (including possibly pre-caching data nightly in a temp table or something) then move to the ASP.NET code and make that faster.
Turn off viewstate for your grid if you can. The viewstate will increase your page size dramatically. Part of your problem will be just serving up the MB's of raw HTML and viewstate and then rendering it.
Steps I would take:
- Turn off viewstate for the grid
- If you are using templates in your columns, try and trim them down by combining controls to reduce the amount of duplicate binding that is occuring.
- Use literal controls in your templates when possible (significantly lighter than labels)
- Pull out all the styling and make sure you you use css to bring down the page size as well.
- If your rows have any javascript, consider removing any inline scripts and applying it once the page loads via Jquery or some other method.
- Think about paging your data
You can get the 2k+ records to work on one page but you will have to make things very tight to do so.
Last resort, get rid of the grid and just use a literal control and output raw, clean, tight html directly to it. Make sure to turn off viewstate for the literal control in this case as well.