• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Grid too large to display

I'm using ASP.net 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.
0
AlHal2
Asked:
AlHal2
  • 4
  • 3
1 Solution
 
guru_samiCommented:
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.
0
 
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.
<Columns>
                       
                    <asp:CommandField ShowSelectButton="True" />
               
           </Columns>

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.
0
 
guru_samiCommented:
Check the event logs to see if there are any specific error messages when you do select....
I think it's timing out...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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?
0
 
guru_samiCommented:
Are you getting any asp.net errors or just "Page cannot be displayed" message by IE?
You can look for error into Windows EventViewer -> Windows Logs-> Applications
0
 
AlHal2Author Commented:
Page cannot be displayed
0
 
AlHal2Author Commented:
Thanks.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now