SPList represents a list on a Microsoft SharePoint Foundation Web site.
0
votes
1answer
416 views
SharePoint: Move SPListItem inside folder to root and set lookup field value
Dear stackoverflow members,
Maybe someone knows a solution for our task:
Given a custom list with folders for countries:
ListA
---FolderA (Title: "USA")
------Item1
------Item2
------Item3
...
2
votes
1answer
156 views
Add content types programmatically into SPList takes too long
I've dozens of CTypes to add to an SPList programmatically (cause content types are provided by CTH) and each oSPList.ContentTypes.Add() takes almost 1sec. Is there any other approach ou code ...
0
votes
1answer
327 views
Proper use of SPWeb from SPContext for pulling lists
So, after about two hours on the subject I am thoroughly confused. There are viewpoints all over the place on how, when, and why to use Dispose() on SPWeb objects as they relate to SPContext.
Can ...
2
votes
1answer
229 views
ProcessBatchData - update a currency field
I'm using SPWeb.ProcessBatchData to update list items, and I'm having a problem with currency field. When I insert something like this
<SetVar ...
1
vote
2answers
1k views
update SPList using csv via Powershell
knowing that is possible in PS, exporting SPList items to PS objects(link1 link2) what is the best way, to go into the other way:
Create/Update an SPList from an exported csv or format-table.
5
votes
3answers
4k views
Fastest way to delete all items with C# [duplicate]
Possible Duplicate:
Deleting all the items from a large list in SharePoint
What is the fastest way to delete all items in a list programmatically? I do not want to remove list and re-create ...
2
votes
1answer
189 views
get hold of a list
$web gives me the title of the website
$list is not giving me any and therefore item add/update i m doing is failing. What is wrong? The code works in dev area. btw, I am running with full rights on ...
1
vote
1answer
97 views
Getting library field parameters when inherited from a site column
The SetUp
I have created 3 site columns. All set to not required fields. I have added these site columns to a content type. This content type I have added to a document library. The document library ...
1
vote
1answer
464 views
How do I get values of fields from custom lists?
I have a custom list ("Contacts") as well as a web part with forms. I want to take the custom list fields and map them to the web part form. My problem is getting the values from the custom list. I've ...
1
vote
3answers
340 views
Item-Level Security Boundaries
Item-Level security boundaries are defined in the Software boundaries document at 1000 items.
In the Advanced List Settings you can specify Item-level Permissions to "Create items and edit items that ...
1
vote
1answer
1k 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
282 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
185 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
547 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
240 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
494 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
505 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";
...
2
votes
3answers
466 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
2k 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
389 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 ...
2
votes
5answers
2k 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
493 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
508 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
436 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 ...
