Search This Blog

2009-04-30

SPList

What is SPList/What are the properties and method of SPList/How can we use SPList
SPList :-

SPList object represent a Sharepoint list in a Sharepoint site.



Properties:-

ContentTypes
Gets the content types that are associated with the list.
ContentTypesEnabled
Gets or sets a Boolean value specifying whether content types are enabled for the list.
DefaultView
Gets the default view for the list.
Description
Gets or sets the description for the list.
EmailAlias
If e-mail notification is enabled, gets or sets the e-mail address to use to notify to the owner of an item when an assignment has changed or the item has been updated.
EnableAssignToEmail
Gets or sets a Boolean value specifying whether e-mail notification is enabled for the list.
EnableAttachments
Gets or sets a Boolean value that specifies whether attachments can be added to items in the list.
EventReceivers
Gets the collection of event receivers that have been registered for the list.
Fields
Gets the collection of field objects that represents all the fields in the list.
Folders
Gets the collection of folder items for the list.
Forms
Gets a collection of form objects that represent the forms that are used in creating, editing, or displaying items in the list.
Hidden
Gets or sets a Boolean value that specifies whether the list is hidden.
ID
Gets the GUID that identifies the list in the database.
ItemCount
Gets the number of items in the list.
Items
Gets the collection of all items in the list.
Lists
Gets the parent collection of lists to which the list belongs.
RoleAssignments
Gets the collection of role assignments for the list.
RootFolder
Gets the folder that contains all the files that are used in working with the list.
Views
Gets the collection of view objects that represents all the views of the list.

Methods :-

BreakRoleInheritance
Breaks the role assignment inheritance for the list and gives the current list its own copy of the role assignments.
Delete
Deletes the list.
GetItemById
Returns the list item with the specified integer ID.
GetItemByUniqueId
Returns the list item that is associated with the specified global unique identifier (GUID).
GetItems
Overloaded. Returns a collection of items from the list.
GetView
Returns a view of the list based on the specified GUID.
Update
Overloaded. Updates the database with changes that are made to the list.

No comments: