Radgrid pagesize not updating

Overview: This blog post is in response to one of the customer queries we received a couple of days back.

One of our India customer called us up and said that they are seeing slowness in couple of pages where they are using Rad Grid.

Problem statement was – when they click on “Add New Row” button it takes nearly 1.5 minutes for the row to appear on the grid.

This made it even scary for them as they had moved the code to production.

So in my case I should see only 10 rows on my first page of the Rad Grid.

Here is the Grid output: Fig 3: Rad Grid output When I ran the app and looked at the trace, here is what I get: Fig 4: SQL Query Trace for SQL Data Source Control bound to Rad Grid What you see here is a call to retrieve all the records from the table. That is correct but what really happens is this: Rad Grid will go ahead and ask SQL Data Source to get the data. Here is the trace that is generated for this: Fig 5: SQL Trace for Page Change Event What you notice is, the SQL Data Source goes ahead and brings all the records from the table.

In order to work with Entity Data Source, you need a Entity Data Model.

I will not get into how to create a Entity Data Model but assume that you know how to do it. NET Entity Data Model and generate the models from the database and use the same Northwind database. NET Entity Data Model created, create a Entity Data Source on the page.

As you can see from the above experiments, Rad Grid is intelligent enough to optimize the queries based on the scenario you are dealing with.I set this entity data source as the data source of the Rad Grid.Analyzing the Queries: Now lets run the app and trace SQL queries for the same set of actions we did with SQL Data Source control.So they were thinking that paging is happening correctly but still why is the add new row scenario slow.So this made me to delve little bit deeper into what exactly is happening in this scenario.

Search for radgrid pagesize not updating:

radgrid pagesize not updating-10radgrid pagesize not updating-34

Also in order to trace the SQL Queries executed, I am making use of a open source tool called “Express Profiler” which is available at Code Plex here:

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “radgrid pagesize not updating”

  1. Don't miss out on this great opportunity to find lonely women in your neighborhood. Age: 42 Real Name: Florencia Weight: 118 Height: 5'6" Years Married: 14 Years Location: , Interest: Young men Husbands Career: Retired Webcam: Yes Marital Situation: The baggage needs to be swapped out.