RadControls for ASP.NET AJAX When you present large number of records at once you will see delays in the grid operations execution. Actually, the problem lies in the browser which cannot handle large amounts of HTML. You can try this with a very large treeview, menu, panelbar, etc. (with thousands of items), or you can even try to select the contents of your page in the browser and you will see 100% CPU utilization for a certain period of time.
To optimize the control performance on the client as much as possible, you may consider:
- Turning off all client features of the grid
- Turning off all row-related features (row select, row click, etc.). When enabling even a single client side row functionality, the grid adds additional scripts to the page which can slow down the performance of the product.
- Use built-in/custom paging or virtual scrolling/paging and present only fixed set
of records at a time - here are online examples for it:
Basic paging
Custom paging
Virtual scrolling and paging
In case you have more than 100 records in a flat grid, it is recommended to turn on the build-in paging/custom paging of the grid. This will not only optimize the grid loading time but also will enrich the user experience, thus giving him/her the flexibility to easily navigate through the grid records.When you have a hierarchical grid, the best approach is to limit the items presented in each level at once to 10-15 at most (through the PageSize property of the GridTableView object).
- Unfortunately JavaScript and CSS implementations in IE are processed slower compared to Gecko-based browsers. There are lots of ActiveX/COM objects, garbage collector does not work at full extent in most of the scenarios, there are some CSS bugs, etc. That is the reason we recommend:
- avoid using non-optimized images in CSS.
- avoid using 1px background images with background-repeat: repeat-x.
- avoid using rows css declarations with images (if applicable).
- If you have hierarchical grid, use on demand loading (HierarchyLoadMode.ServerOnDemand) of detail tables with DetailTableDataBind child tables content generation. You can combine these settings with:
- single expand for grid items at the same level
- switching on the AJAX mechanism of the control ()
- switching off the AJAX mode of the grid ()and wrapping it in RadAJAXPanel (thus avoiding the serialization of the grid client object)
- the techniques stated in points 1-4.
- If your grid or several instances of the control reside in page view(s) of RadMultipage (connected to RadTabStrip), we recommend choosing RenderSelectedPageOnly = true for RadMultipage, set AutoPostBack = true for the tabstrip and ajaxify the tabstrip and the multipage via RadAjaxManager. Thus only the active page view will be loaded at a time and merly the grid object residing in that page view will be bound to data, thus reducing the loading and rendering time of the page.
- Your final options is to turn off ViewState by setting EnableViewState = false
for the grid. This, however, requires some extra work on your behalf and I will suggest
that you review the following help topic very carefully:
Disabling the viewstate of GridTableView
We have also discussed the performance of Telerik RadGrid vs. a table in this Forum post:
performance compared to asp:table (applicable for RadGrid for ASP.NET AJAX as well)