[Download Code]
In concluding this article, I would like to point out the following:
- The LoadData event only requires a data source to be created and assign to the DataSource property of the event argument. Therefore, it is possible to create the data source in a middle-tier class instead of in the data access page.
- In all the demos in this article, we sort and page the data in ASP.NET. While this method works well for small datasets, we should avoid it on large datasets. We should consider sorting large datasets on the server side. The SortExpression property the DataGridHelper control could be used in the LoadData event to sort the dataset on the server side. Currently, there are a number of techniques available on paging through large datasets. We should set the AllowCustomPaging property of the DataGrid control to true, and use the CurrentPageIndex property of the DataGrid to fetch a subset of data in the LoadData event.
In the next article of the series, I discuss how to simplify the DataGrid programming involved in doing an update or delete.
Check http://www.dotneteer.com/home/datagridhelper for future updates. For comments, questions and suggestions, email lichen@linkline.com.