Radgrid pagesize not updating
SQL Data Source will blindly execute the query that has been set for the select command. Rad Grid will then pick up only the second page rows and displays it.Rad Grid will not be able to do any tinkering with query because the SQL Data Source does not provide us a chance to put paging related statements. Now lets go ahead and click on the Add New Row button and trace the query executed: Fig 6: SQL Trace for Add New Record Event As you can see it again retrieves all the records from the table.
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.First, on page load: Fig 7: Entity Data Source – Page Load – Query Trace As you can see we have put in a “SELECT TOP 10” statement in the query.So its not bringing all 2155 records rather only 10 records. We also execute one additional query to get the total record count.Now lets see what happens when we do a paging: Fig 8: Entity Data Source – Paging – Query Trace Now, lets trace the query when we do ‘’Add new record” scenario: Fig 9: Entity Data Source – Add New Record – Query Trace Notice that, in this scenario, we automatically page to the last row and add a blank record.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.