SPList represents a list on a Microsoft SharePoint Foundation Web site.

learn more… | top users | synonyms

1
vote
3answers
1k views

Unable to programatically update list title

If I use using(SPSite site = new SPSite("http://somwewb")) { using(SPWeb web = site.OpenWeb()) { SPList lst = web.Lists["My custom list"]; lst.Title = "My custom list 2"; ...
3
votes
4answers
779 views

Programmatically adding SharePoint Lists to external SQL database

I need to export a SharePoint list to an external SQL database. My initial idea is to open the list as a datatable and bulk update. I created a console app I can run anytime I need to sync the data. ...
1
vote
3answers
3k views

ListAdded is not firing when list is created by code

I have an SPListEventReceiver that handles the ListAdded event. If checks that the list is a Document Library, and then adds some fields to the library: public class ListEventReceiver : ...
2
votes
1answer
864 views

Is it possible to update a list's icon?

Is there a way to update a list's icon? I was looking to use SPList.ImageUrl, but this is read only. The problem is that I've updated a list definition's icon; unfortunately there several list ...
3
votes
5answers
3k views

How do you hide a hidden list?

If you set the SPList.Hidden property to true, the list isn't shown in the Quick Launch, All Site Content, Lookup lists, etc. However, it is still possible to navigate to the list by typing in the ...
0
votes
1answer
612 views

Is there a property to get all subitems/subfolders from a SPListItem?

I need to find out how many subitems and subfolders a SPListItem has. The fields ItemChildCount and FolderChildCount are no solution for me, because they only count the folder/item directly beneath ...
2
votes
2answers
899 views

How to find a file with name = X in a SPList

Looking for recommendations. Have a file in a document library with name x.txt. In a workflow code behind, I need to get the file to read its contents. What is the best/most efficient way to do ...
1
vote
3answers
631 views

is this causing memory leaks?

I have a couple of utility functions that help with querying lists and wanted to see if they I wrote them would cause either memory leaks or cause the client code to try to access already disposed ...