The following return a DataTable:
- DynamicQuery's obj.Query.LoadDataTable() loads records from the database based on an EntitySpaces DynamicQuery. It returns a DataTable, whereas, obj.Query.Load() will populate your collection and return a boolean true if at least one record was loaded.
- The protected FillDataTable methods which can be used in your Custom classes. See the EntitySpaces API chm that is installed in your Start Menu for examples.
- The protected Table property, which can be used in your Custom classes to gain access to the underlying DataTable for an already loaded collection.
In a windows application (as opposed to ASP.NET), I think most people use paging to reduce network traffic and memory consumption. The article you cited does not address either of these and seems to be more presentation oriented. As Martin and Mike noted in their posts, if you are using SQL Server 2005+, then EntitySpaces' DynamicQuery supports true server-side paging.
But, let me throw in my 2 cents regarding presentation. As an end user, I've never cared for VCR-like navigation, and paging is only a minor improvement over that. I would much rather be presented with a simple filtering mechanism, client names that begin with 'C', for example, and then, scroll though a sorted, filtered list to find the record I'm interested in. In EntitySpaces, that can be accomplished either by loading an entire collection and using the collection.Filter property before binding, or by using the user's criteria in a DynamicQuery, and loading just those records for binding to the grid. Just some food for thought.
David Neal Parsons
www.entityspaces.net