GetDataTable Method
The GetDataTable method of the SPListItemCollection class returns the collection of list items as a data table.
Return Value
A System.Data.DataTable object that contains the list items.
Example
The following code example uses the GetDataTable method to display items in a DataGrid control.
This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.
The example assumes the existence of an .aspx page that contains a DataGrid control.
Requirements
Platforms: Microsoft Windows ServerĀ 2003
Security: Code Access Security