A class of the Microsoft.SharePoint namespace, SPListItemCollection represents a collection of SPListItem objects.

learn more… | top users | synonyms

0
votes
1answer
45 views

Where does a list item go when it is deleted using Server Object Model?

Assumptions: I have a custom SharePoint list with 2 items in it. In one case i delete one item from the list manually and check the recycle bin,here i find the deleted item. Now in the second case i ...
0
votes
1answer
82 views

Setting Managed metadata field

I am trying to update a managed metadata field but I get an error saying `Property 'ListItemCollectionPosition' cannot be found on this object'$spQuery.<< $site1 = Get-SPSite mysite ...
2
votes
2answers
363 views

Convert DataTable to SPListItemCollection

Consider the following code:- SPListItemCollection collListItems = emp_info.GetItems(query); dt = collListItems.GetDataTable(); Now i want to convert the dt object back to SPListItemCollection ...
2
votes
1answer
97 views

serialize SPListItemCollection through WCF sharepoint 2013

My question is simple, how to get ( or retrieve ) json serialized SPListItemCollection through WCF service ? tried to use NewtonSoft for .Net, but it's throw an exception when try to serialized it. I ...
6
votes
0answers
91 views

How does calculated field value form in pageInfo

Using paging in XsltListViewWebPart there are some rules, which form pageInfo attributes and which we can see in the query string. Here is the short example, what I mean. ...
0
votes
1answer
207 views

Bestway to store and manipulate SPListItemCollection results

I get a SPListItemCollection in my program. I use this collection to show the items in a DataGridView display. I need to filter items based on a requirement. But .Add() or Delete() does changes to ...
0
votes
1answer
304 views

SPListItemCollection slow

I have a list with over 150k records. I'm doing a filter to get only 1 record via CAML, only sort by a particular column, and this is it takes at least 15 seconds for me to have this return, which is ...
0
votes
4answers
2k views

How to get count of list items in SharePoint 2010 if count is more than List View Threshold value?

I have more than 10000 items in my list. I have default List View Threshold value as 5000.I want to get the count of items programmatically. How can I get the count? I think here ...
2
votes
1answer
2k views

CAML query limitation of values in IN operator

I have less than 5000 items in my library. I want to get 530 items by ids. So I am using following query. <Where> <In> <FieldRef Name="ID" /> <Values> ...
0
votes
2answers
589 views

ItemEventReceiver - ItemDeleting not working with a document library and referencing list

I have a custom list that has a GUID column which refers to the UniqueId of a document in a document library. Every time I upload a document, it should add an entry in this list and populate the ...
0
votes
4answers
130 views

SPListItem.Delete() has some issues

I have a list which consist of more than 5600 items. In my application i will search all the items from particular date range by using SPquery. As the result of the SPQuery, the splistitem collection ...
0
votes
2answers
2k views

How to get SPListItemCollection from a SPFolder?

I am making a SharePoint 2010 visual web part, and I want to recursively iterate through all files in a document library which has nested folders. I can get a SPListItemCollection for all items and ...
0
votes
1answer
357 views

Proper way to evaluate/get status of boolean field when looping through SP List with code

What is the best way to do this when looping a list? I have tried to evaluate it with something like this but it wont let me evaluate bool as an "if" condition if (item["ShowTitle"] == true) //do ...
0
votes
1answer
257 views

Double value in URL from SPListItemCollection result

I have a basic list which I am using to generate a "Quick Links" menu WebPart. It looks ok but for some reason the URL field (of URL type) when rendered renders html that looks like this: <a ...
10
votes
1answer
5k views

SPList.Add() vs SPList.AddItem() SharePoint 2010

Using some test code i found out that SPList.AddItem() executes slight faster then SPList.Add() - does anyone know why is it so ? DateTime start = DateTime.Now; SPList ...
0
votes
0answers
309 views

SPListItemCollection.EnsureListItemsData seems to deadlock

I'm trying out multithreading with the SP2010 Object Model and I've run into some weirdness. My application currently does the following: Opens an SPSite and uses AllWebs.WebsInfo to build a Guid[] ...
2
votes
4answers
5k views

Get value of Hyperlink field in Sharepoint 2010 list item

I'm trying to get the value of a field of type "Hyperlink or Image" (currently set to "Hyperlink" in the column settings that is being returned as part of a Sharepoint 2010 ListItem. I'm using the ...
0
votes
2answers
6k views

SPListItemCollection Get ItemCount with rowlimit

I am filtering a list in caml SPQuery oQuery = new SPQuery(); oQuery.Query = "<OrderBy><FieldRef Name='FullName' /></OrderBy><Where><Contains><FieldRef ...
0
votes
2answers
1k views

Get all SPLists for a site collection

I feel like I'm very close on this one. I know how to get the root site collection from this: How can I get the root site collection from SPContext.Current? I've been messing around with ...
0
votes
2answers
472 views

get a list of items inside a folder in document library

I built the following code so far: SPWeb web = __Context.Web; Guid listGuid = new Guid(__Context.ListId); SPList myList = web.Lists[listGuid]; SPListItem myItem = ...
2
votes
0answers
132 views

Is my Object Casting Model acceptable?

I'm creating a SharePoint application, and am trying some new things to create what amounts to an API for Data Access to maintain consistency and conventions. I haven't seen this before, and that ...
1
vote
3answers
5k views

Getting specific SPFile from document library

I have a Document Library called "x" with file named "y". I am curious what the best way to get the SPFile object for the specified SPListItem. Currently I am using this: ...
1
vote
1answer
970 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 ...
1
vote
3answers
663 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 ...
2
votes
1answer
899 views

Search Optimization on SPListItemCollection

I have an SPListItemCollection (Thread Discussion Collection) that consists of almost 20,000 items. Each SPListItem (Thread Discussion) on the SPListItemCollection contains a sub SPListItem(Thread ...
3
votes
3answers
2k views

GridView lookups displaying as “id;#value”

I am using an ASP.net gridview. The datasource is SPList.Items.GetDataTable(). The gridview is working fine; however, lookup and multilookup columns display as "id;#value". Is there any way to just ...