The splistitemcollection tag has no wiki summary.
4
votes
1answer
796 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 ...
3
votes
3answers
1k 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 ...
2
votes
1answer
702 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 ...
1
vote
3answers
2k 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
3answers
441 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 ...
1
vote
1answer
554 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
2answers
643 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 ...
1
vote
0answers
91 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 ...
0
votes
2answers
483 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
1answer
52 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 ...
0
votes
2answers
249 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 = ...
0
votes
1answer
17 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
41 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
0answers
22 views
File in document library is missing SPListItem
I have a "Master Page Gallery" where I can get some files using myList.RootFolder.Files but they do not exisit in myList.GetItems()
Using powershell I have found the file has all valid data but no ...
0
votes
0answers
8 views
How can I insert an action that collects data from multiple users in one action
How can I insert an action that collects data from multiple (8) users in one action, instead of inserting eight Collect Data actions to the workflow?
0
votes
0answers
184 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[] ...
0
votes
2answers
2k 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 ...