I have a DataGridView where I show some information on the Web, everything works fine when I have few records but the problem is when the DataGridView tries to load more than 300 records or so, because the page takes a long time loading information.
The question is there a way to optimize such queries with a Datagridview?
Start by making sure you use the good practices:
If that does not help, use profiler such as ANTS or dotTrace to investigate DataGridView behavior.
These tools will show you exactly where the bottlenecks are.