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

learn more… | top users | synonyms

1
vote
1answer
2k views

Share List between subsites of sharepoint2010

Anyone know how can we share one subsites list to another subsite ? I want to allow all operations also and also want to put in read only mode in another subsite. Anyone have idea how can i do this ? ...
0
votes
1answer
425 views

field type URL. how to prepare csv for this?

I am running a powershell to import csv into a list. There is one field "ProviderURL" in the list. In the csv I had http://www.contoso.com and it imported fine. Howerver, I would like it to be Contoso ...
0
votes
1answer
365 views

Changing SPField cause no changes

I try to change an SPField after SPList creation, but I'm not getting any results of that change. using this code: SPField oSPField = oSPList.Fields[new Guid("MyFieldGuid")]; ...
1
vote
1answer
995 views

When to use List<SPList> vs SPListCollection?

If I have to grab numerous lists which I have the name, URL or Guid of, should I use web.Lists and return the entire SPListCollection or grab the specific ones I need via web.Lists[Guid] and place ...
0
votes
3answers
306 views

Tool to get SPList in webpart using tool

I want to get SPList data in webpart just passing name in tool. Anybody have any idea about that?Please Suggest me.
0
votes
4answers
827 views

Fetch SPList items from another siteCollection - problem with xml

Trying to fetch all list items from a list located in a different site collection and traverse the list items, reading some of their column values. I've taken some code from an example snippet that ...
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"; ...
4
votes
4answers
814 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 : ...
3
votes
1answer
1k 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
4k 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
626 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
992 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
677 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 ...