Solved

Grid too large to display

Posted on 2013-06-20
7
167 Views
Last Modified: 2013-07-25
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
Comment
Question by:AlHal2
  • 4
  • 3
7 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 39263592
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
 

Author Comment

by:AlHal2
ID: 39265229
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
 
LVL 41

Expert Comment

by:guru_sami
ID: 39266432
Check the event logs to see if there are any specific error messages when you do select....
I think it's timing out...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:AlHal2
ID: 39270749
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
 
LVL 41

Accepted Solution

by:
guru_sami earned 250 total points
ID: 39273075
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
 

Author Comment

by:AlHal2
ID: 39287978
Page cannot be displayed
0
 

Author Closing Comment

by:AlHal2
ID: 39353955
Thanks.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now