Grid too large to display

I'm using 3.5.  When the user presses the display button the gridview can display a certain number of rows.  Beyond that the page crashes.  Is there any way to get a proper error message explaining what the problem is (too many rows to display)?
The user can then filter as necessary.
Who is Participating?
guru_samiConnect With a Mentor Commented:
Are you getting any errors or just "Page cannot be displayed" message by IE?
You can look for error into Windows EventViewer -> Windows Logs-> Applications
I would suggest implementing Paging with GridView.

If you just want to show message, you can check the records returned from your database and if it's greater than some particular number don't bind it to GV but instead just display a message. Although I am not sure if that's a good idea for your users or not.
AlHal2Author Commented:
You've given me the idea of putting the gridview1.databind statement into a try catch block.
This grid has a select button due to this code.
                    <asp:CommandField ShowSelectButton="True" />

The grid is displaying, but when the user presses a select button the page crashes.  It doesn't even look at the code in GridView1_SelectedIndexChanged or form_load events.

However when the grid is smaller it works OK.  Sorry for not mentioning this before.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Check the event logs to see if there are any specific error messages when you do select....
I think it's timing out...
AlHal2Author Commented:
I'm running the source code on my own machine and it times out before executing the form load or selectedIndex change events.
Where would I find the logs?
AlHal2Author Commented:
Page cannot be displayed
AlHal2Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.