The List, ListItem and CrossList modes of SPDataSource are well documented, but the Webs and ListOfLists modes have more or less gone unnoticed. So as of WSS 3.0 SP1, here’s a complete list of fields for these modes, many of which map to internal properties of SPWeb and SPList.
SPDataSourceMode.Webs |
||
| Field | Type | Internal? |
|---|---|---|
| __spAllowAnonymousAccess | Boolean | |
| __spAllowGlobalCatalog | Boolean | Y |
| __spAllowP2P | Boolean | Y |
| __spAlternateCssUrl | String | |
| __spAlternateHeader | String | |
| __spCanAddDeleteWebParts | Boolean | Y |
| __spCanCustomizePages | Boolean | Y |
| __spCanPersonalizeWebParts | Boolean | Y |
| __spConfiguration | Int16 | |
| __spCreated | DateTime | |
| __spCurrencyLocaleID | Int32 | |
| __spCustomizationMode | Boolean | Y |
| __spCustomJSUrl | String | Y |
| __spDefaultUrl | String | Y |
| __spDescription | String | |
| __spEffectivePresenceEnabled | Boolean | |
| __spEmailInsertsEnabled | Boolean | |
| __spEventHandlersEnabled | Boolean | |
| __spExecuteUrl | String | |
| __spExists | Boolean | |
| __spExternalSecurityProviderSetting | String | |
| __spHasExternalSecurityProvider | Boolean | |
| __spHasUniquePerm | Boolean | |
| __spHasUniqueRoleAssignments | Boolean | |
| __spHasUniqueRoleDefinitions | Boolean | |
| __spID | Guid | |
| __spIgnoreCheckOutLock | Boolean | Y |
| __spIncludeSupportingFolders | Boolean | |
| __spIsADAccountCreationMode | Boolean | |
| __spIsADEmailEnabled | Boolean | |
| __spIsParsingWebPartPage | Boolean | Y |
| __spIsRootWeb | Boolean | |
| __spLanguage | UInt32 | |
| __spLastItemModifiedDate | DateTime | |
| __spMasterUrl | String | |
| __spCustomMasterUrl | String | |
| __spMeetingCount | Int16 | Y |
| __spName | String | |
| __spParentWebId | Guid | |
| __spPersonalizationMode | Boolean | Y |
| __spPortalMember | Boolean | |
| __spPortalName | String | |
| __spPortalSubscriptionUrl | String | |
| __spPortalUrl | String | |
| __spPresenceEnabled | Boolean | |
| __spPublicFolderRootUrl | String | |
| __spServerNow | DateTime | Y |
| __spServerRelativeUrl | String | |
| __spSyndicationEnabled | Boolean | |
| __spTheme | String | |
| __spThemeCssUrl | String | |
| __spTitle | String | |
| __spUrl | String | |
| __spUserInfoListId | Guid | Y |
| __spUserIsSiteAdmin | Boolean | |
| __spUserIsWebAdmin | Boolean | |
| __spViewMode | Boolean | Y |
| __spWebTemplate | String | |
| __spWebTemplateId | Int32 | |
SPDataSourceMode.ListOfLists |
||
| Field | Type | Internal? |
| __spAllowContentTypes | Boolean | |
| __spAllowDeletion | Boolean | |
| __spAllowMultiResponses | Boolean | |
| __spCanReceiveEmail | Boolean | |
| __spContentTypesEnabled | Boolean | |
| __spCreated | DateTime | |
| __spDefaultViewUrl | String | |
| __spDescription | String | |
| __spDirection | String | |
| __spEmailAlias | String | |
| __spEnableAssignToEmail | Boolean | |
| __spEnableAttachments | Boolean | |
| __spEnableMinorVersions | Boolean | |
| __spEnableModeration | Boolean | |
| __spEnableSyndication | Boolean | |
| __spEnableVersioning | Boolean | |
| __spEventSinkAssembly | String | |
| __spEventSinkClass | String | |
| __spEventSinkData | String | |
| __spExcludeFromTemplate | Boolean | |
| __spFlags | UInt64 | Y |
| __spForceCheckout | Boolean | |
| __spHasExternalEmailHandler | Boolean | |
| __spHasUniqueRoleAssignments | Boolean | |
| __spHidden | Boolean | |
| __spID | Guid | |
| __spImageUrl | String | |
| __spInternalName | String | Y |
| __spItemCount | Int32 | |
| __spLastItemDeletedDate | DateTime | |
| __spLastItemModifiedDate | DateTime | |
| __spMultipleDataList | Boolean | |
| __spOnQuickLaunch | Boolean | |
| __spOrdered | Boolean | |
| __spParentWebUrl | String | |
| __spPropertiesXml | String | |
| __spReadSecurity | Int32 | |
| __spRootFolderUrl | String | Y |
| __spSchemaXml | String | |
| __spSendToLocationName | String | |
| __spSendToLocationUrl | String | |
| __spShowUser | Boolean | |
| __spTitle | String | |
| __spVersion | Int32 | |
| __spWriteSecurity | Int32 | |


September 9, 2008 at 1:24 am
[…] SPDataSource Fields for Webs & ListsOfLists […]
January 26, 2009 at 4:43 am
Keith,
thanks for this one! Saved me some time :)
Robin
June 26, 2009 at 4:58 am
Hi Keith,
Is there a way to programmatically access the data of the SPDataSource without having to bind it to a web control? Most examples I’ve seen have people writing declarative or object model code that uses SPDataSource (naturally) as the data source to populate a drop-down list or some other GUI control. But I’d like to be able to query the data that’s returned, either by binding it to an array or some other non-GUI type-object, or without having to create some front-end object at all. Is that possible as far as you’re aware? (As a workaround I’m creating a drop-down list programmatically then doing a FindByText or FindByValue on that object, but… it’s a bit of a kludge). Any thoughts appreciated, thanks, -Dave
June 28, 2009 at 2:26 am
SPDataSource.GetView()returns anSPDataSourceViewfrom which you should be able toSelect()the data. This SO question has some code that looks like it should work, noting the dependency onSPContext.Hope this helps ~
Keith
June 29, 2009 at 3:48 am
thanks very much, cheers,
Dave