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

  • Home
  • SEARCH
  • 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 6052293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:54:45+00:00 2026-05-23T07:54:45+00:00

I’m stumped on this performance issue. When paging a RadGrid I get instantaneous results.

  • 0

I’m stumped on this performance issue. When paging a RadGrid I get instantaneous results. However, when I filter any of the columns, the query takes around 10 seconds to complete and any paging applied after the filter remains just as slow. If I remove the filter the performance is just fine.

Production is a SharePoint 2010 Server which is hosted in-house with a small number of users. I am using a RadGrid control, version 2009.3..1314.35 that queries a table containing 30,000 records. I am using LINQ to SQL for the back-end. I have used IE and Firefox in production. On my development machine there are no performance issues.

The query isn’t complex, the record source isn’t exceptionally large and the traffic is low, so I’m not sure how to track the issue down. Here are some thoughts I have:

  • Something is wrong with my LINQ query.
  • Misuse or misunderstanding of the RadGrid.
  • Database isn’t optimized? I converted it from Access to SQL Server 2008.
  • Network issue?

Below is my code. Any help would be appreciated.

ASPX:

      <telerik:GridTemplateColumn AllowFiltering="false" SortExpression="Marked" HeaderText="Marked" UniqueName="Marked">

           <ItemTemplate>
             <asp:CheckBox
               ID="chkbxMarked" runat="server"
               OnCheckedChanged="ToggleRowSelection"
               Checked='<%# Eval("Marked") %>'
               AutoPostBack="True" />
           </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="NamePrefix" SortExpression="NamePrefix" AllowFiltering="false" HeaderText="Name Prefix" />
        <telerik:GridBoundColumn DataField="LastName" SortExpression="LastName"  AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Last Name" />
        <telerik:GridBoundColumn DataField="FirstName" SortExpression="FirstName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="First Name" />
        <telerik:GridBoundColumn DataField="MiddleName" SortExpression="MiddleName" AllowFiltering="false" HeaderText="Middle Name" />
        <telerik:GridBoundColumn DataField="Phone1" SortExpression="Phone1" AllowFiltering="false" HeaderText="Phone" />
        <telerik:GridBoundColumn DataField="Phone1Ext" SortExpression="Phone1Ext" AllowFiltering="false" HeaderText="Ext." />
        <telerik:GridBoundColumn DataField="Email1" SortExpression="Email1" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Email" />
        <telerik:GridBoundColumn DataField="Profile" SortExpression="Profile" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderText="Profile" />    

    </Columns>
</MasterTableView>

BLL:

   public IList<Person> FindAllByProfile(string profileName, int rowStart, int numRows)
   {
       return profileName == "All" ? _repos.FindAll(rowStart, numRows) : _repos.FindAllByProfile(profileName, rowStart, numRows);
   }

   public int FindAllByProfileCount(string profileName)
   {
       return profileName == "All" ? _repos.FindAllCount() : _repos.FindAllByProfileCount(profileName);
   }

Repository:

  public IList<Person> FindAll(int rowStart, int numRows)
  {
      using (PRADbDataContext db = new PRADbDataContext())
      {
          var data = from p in db.persons
                     join c in db.contacts on p.PersKey equals c.PersKey into personContacts
                     from pc in personContacts.DefaultIfEmpty()
                     orderby p.Modified descending
                     select new Person()
                                {
                                    Id = p.PersKey,
                                    AddressId = p.AddrKey,
                                    DateModified = p.Modified,
                                    Email1 = p.EMail1,
                                    Marked = p.Marked,
                                    Phone1 = p.Phone1,
                                    Phone1Ext = p.PhExt1,
                                    NamePrefix = p.MrMs,
                                    FirstName = p.FName,
                                    LastName = p.LName,
                                    MiddleName = p.MName,
                                    Title = p.Title,
                                    Profile = pc.ProfKey ?? "N/A"
                                };
          return data.Skip(rowStart).Take(numRows).ToList();
      }
  }

  public int FindAllCount()
  {
      using (PRADbDataContext db = new PRADbDataContext())
          {
              var data = from p in db.persons
                         join c in db.contacts on p.PersKey equals c.PersKey
                         select new Person()
                         {
                             Id = p.PersKey,
                         };
              return data.Count();
          }
  }
  • 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-23T07:54:46+00:00Added an answer on May 23, 2026 at 7:54 am

    I’d recommend using LINQPad to emulate the queries.

    1. You can look at the SQL tab to see all the SQL being produced. If it’s the SQL itself causing the problem, you can profile it in SQL Server Management Studio and see why it’s taking so long.
    2. You can load your DLL and run your actual methods, to see if it’s something to do with the way the method is handling the data.
    3. If you can tell that your method runs without a problem, then you can narrow down the issue to the way the telerik controls are calling your methods.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.