Solved

Grid too large to display

Posted on 2013-06-20
7
170 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

911 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

21 Experts available now in Live!

Get 1:1 Help Now