Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6838077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:33:12+00:00 2026-05-26T23:33:12+00:00

I placed a GridView inside an update panel. <asp:UpdatePanel ID=UpdatePanel4 UpdateMode=Conditional ChildrenAsTriggers=true runat=server> <asp:GridView

  • 0

I placed a GridView inside an update panel.

<asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional" ChildrenAsTriggers="true"
                runat="server">
                        <asp:GridView ID="GridView_Overview" OnRowCommand="GridView_Layout_RowCommand" />
</asp:GridView>
</asp:UpdatePanel>

When the user press a button, the gridView will be filled up with a datatable:

GridView_Overview.DataSource = dataTable;
GridView_Overview.DataBind();

The dataTable contains more than 10000 records. Therefore, the binding process to the gridview took about 3,4 seconds.

When a row is selected in the gridview:

protected void GridView_Layout_RowCommand(object sender, GridViewCommandEventArgs e)
 {if (e.CommandName.Equals("Select"))
      {
          int index = Convert.ToInt32(e.CommandArgument);
          GridViewRow row = this.GridView_Overview.Rows[index];
          Int64 pID = Int64.Parse(((Label)row.FindControl("ID")).Text); // abc
      }
 }

It took 5,6 seconds to perform GridView_Layout_RowCommand as above. What is the issue here? How can I improve the performance of selecting a row. If I discard the //abc code line then it is fast but then I can not get the ID value for further process.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:33:12+00:00Added an answer on May 26, 2026 at 11:33 pm

    This problem is occurring because the asynchronous postback from the UpdatePanel will be triggered only after walking through the entire DOM. If you’re adding over 10000 records to the page then your DOM is going to be huge and the delay will be significant.

    The key to solving your problem is destroying the GridView DOM elements before the postback is triggered. This way, there will be much less DOM to be traversed.

    See this blog post for some tips on handling the situation: Slow performance of a GridView inside an UpdatePanel

    At the very least, including even the most basic form of paging will improve client-side performance as it will reduce the number of DOM elements added to the page. For maximum results, you’ll want to have a solution that also only selects each page of data so that you don’t need to return 10000 records but only display a subset.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following GridView : <asp:GridView runat=server ID=GridMenuItemAttributes DataKeyNames=MenuItemAttributeID AutoGenerateColumns=false OnRowCommand=GridMenuItemAttributes_RowCommand DataSourceID=DSMenuItemAttributes OnRowEditing=GridMenuItemAttributes_RowEditing >
I am trying to place an asp gridview inside an asp datalist. For each
I have a nested GridView that is placed inside a ListView. The GridView renders
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
I have a gridview which has an asp image-button for deleting a row. I
I want to get the value of check box placed inside grid view. if
I have created an ASP.NET 3.5 form page. At the top I have placed
I am having a Gridview. I had placed a delete button in the last
I have a web project in C#/asp.net. I have a UserControl with a GridView
In an ASP.NET GridView is it possible to truncate the displayed text but yet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.