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

learn more… | top users | synonyms

0
votes
0answers
12 views

Paging for a datagrid

I am using the following approach for controlling how many records are produced from a custom list. The problem that i am facing is that since there are alot of records in a list where a result for ...
0
votes
0answers
8 views

Excel Online - refresh data in a SharePoint list

I have added a SharePoint list to an excel spreadsheet as an odata feed. This data connection refreshes perfectly using Excel on the Desktop. However, when I refresh the connection in the Excel web ...
1
vote
0answers
40 views

How do I make a dynamically created SPList read-only in browser, but editable in code?

In code, I create a SPList. I write to this list programatically, but I would like the list to appear read-only for all users (perhaps excluding admins only) in browser only, i.e. I don't want to ...
0
votes
0answers
26 views

_ModerationStatus on list items is always draft from SPQuery

I am querying for list items in a timer job. The list has moderation enabled. It has various list items that have different approval status (e.g. scheduled, approved etc.). However the query always ...
1
vote
1answer
53 views

How to get username through REST

I am currently working with a task where you have a SPList in one farm that holds some data that we need to aggregate into a view on another farm. Therefore I am working on a Visual Web Part that ...
3
votes
0answers
71 views

SPGridView - How to make it look & feel like built-in SP grid

In C# code, I'm working with the SPGridView control to display list items from a list of type SPDocumentLibrary. It binds fine, but it looks totally plain and has basically no features. I would like ...
1
vote
3answers
47 views

Cannot iterate subfolders of a very large folder

I have working code that is to iterate lots of folders in our (rather large) document archive, but one folder (which happens to have a very large amount of subfolders) does not allow me to iterate it. ...
1
vote
2answers
113 views

Why does SPList.GetItems(string fields[]) return more fields than specified?

I'm using SPList.GetItems(string fields[]) to obtain only specific item fields from a document library: SPListItemCollection items = list.GetItems("UniqueId", "Name"); However, iterating the items ...
1
vote
1answer
25 views

Is there a setting that determines the default root folder of a freshly-created SPList?

I noticed that when I create lists on my development site(s), they're created right in the site's root (in other words, URLs look like xxx/sites/DEV/DocLibX). The last time I looked (a few days ago), ...
2
votes
2answers
68 views

Unable to set permission on list for multiple spgroup

I have a list to which I want to set permission to 2 site groups. Among them, one is contribute level and second is read. My code for assigning the permission to list is: private void ...
0
votes
1answer
79 views

Adding an splist instance to an Application page programmatically through xaml/backend c#

I have created a custom list which I wish to put inside an application page, since I wish to be able to filter what is shown inside the list to the content which is related to the user. Is there any ...
1
vote
0answers
36 views

Using DefaultNewFormUrl's link on Document Library opens item on save

As our company tries to move away from the folder structure and into a tag-driven structure we were left with a dilemma. Users can only add content to folders/libraries yet they don't want to have to ...
1
vote
0answers
30 views

'E-Mail a Link' Ribbon Button generates a wrong URL on Grouped Views

When a Grouped View is defined in a List View Web Part, the OOB Ribbon Button 'Email a link' on a List/Library Context Tab, generates an incomplete URL (only Web Application URL) Override the Ribbon ...
0
votes
1answer
71 views

Add additional user information to SPList as list column

I have a List Tickets with a field Client. This is a user from our AD and displays the name of the user. We now need to display the country and the location the user resides in to additional fields. ...
1
vote
2answers
244 views

How to create tempary hidden field or variable in infopath that not going to add to SP List

I want add tempary variable or field to Infopath Brower Form to hold some information i want to set by rules. So i dont need this field in my sharepoint list.. Is there any way to do this without ...
0
votes
2answers
292 views

JSLink set in list definition (schema.xml) not being loaded

I have created a custom list definition and detailed in many articles across the net I have specified my file in the JSLink property of the view. For some reason it is no longer working. <JSLink ...
0
votes
2answers
230 views

Changing permission for splist

How can I change the list permission to be read only for all groups in the site? programmatically. This is my code: list.BreakRoleInheritance(true); SPRoleDefinition roleDefinition = ...
1
vote
1answer
82 views

In SharePoint 2010, is there a way to stop one user from subscribing to list alerts?

For example, when a list is updated, a user can subscribe to the list so they get emails about the changes to the list. I can remove a user from getting those alerts, but the user can simply go back ...
0
votes
2answers
94 views

Is it possible to populate result by joining two lists throughout the site collection

Scenario is somewhat like this: I have n number of subsites and each subsite contains two lists(exactly same in all subsites) having parent child relationships using a lookup column, need to populate ...
1
vote
2answers
151 views

View aggregations programmatically

I have a view in my list, I defined aggregations in my view: sum and average of several columns. Now I want to get programmatically the aggregations results. How can I get it?
0
votes
2answers
320 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
1answer
137 views

Which of these is the best way to get a list item collection?

Performance-wise which of these methods is the best way to get a list item collection, and why? SPList list = web.getlist("listurl"); SPListItemCollection items = list.getItems(query); ...
0
votes
0answers
97 views

Programmatically updated SPList view filter is showing <!#Render Error--> in the view Moss 2007

Am appending a filter condition to a particular view alertview.Query = viewQuery.ToString(); alertview.ParentList.ParentWeb.AllowUnsafeUpdates = true; alertview.Update(); ...
2
votes
1answer
375 views

List.AddItem() and List.Item.Add() … why two methods for same purpose

I searched and got the difference between List.AddItem() and List.Item.Add(). SPList.Add() vs SPList.AddItem() SharePoint 2010 Now the query which comes to my mind is that why Sharepoint has two ...
0
votes
0answers
26 views

Create Totals List (Group By like) based on another

First of all, I don't have SP Server installed, therefore I can't write a SP application Secondly, my only tool is SP Designer 2007 I have a Contact List SP list: Name, Email, ...other info, ...
0
votes
0answers
47 views

RenderAsHtml returns empty string for Posts List

I am tring to render Blog Posts list using RenderAsHTML() method but it returns empty string. The same method works for other lists. Here is the code, tried in console app: string url = ...
1
vote
2answers
167 views

Deleting all items from a list and then adding new items will not give the new items id 1,2,3 etc

I have a list with 3 items. When I delete these 3 items and add new items they get ID 4, ID 5 and ID 6. But I want the new items to get ID 1, ID 2, and ID 3. Is there any workaround? This is how I ...
2
votes
1answer
79 views

Changed URL to pages, but still redirects to Pages?

I have an external website which needs to show URL in lowercase only. I don’t want to use URL Rewrite or any third party tool. Instead we decided to change the actual URL’s of the Pages Library. I’ve ...
0
votes
0answers
68 views

Multichoice boxes in SharePoint (SPFieldType)

I have the following code: SPList targetList = spWeb.Lists["Certification"]; list.Fields.AddLookup("MemberCertifications", targetList.ID, false); ...
0
votes
1answer
78 views

Best way to update 200 items on a list [closed]

Situation in a VS2010/SP2010 site: List A with main items List B with subitems, having a lookup column that points to List A ID There are about 200 subitems for each item The Page where users edit ...
0
votes
0answers
24 views

Concept of a dynamic list view based on user location

I am requested to create a list with the following mandatory columns: Image | Content | GER(bool) | Ger-ReleaseDate (Date)| UK(bool) | UK-ReleaseDate(Date) | ES | ... | additional information From ...
5
votes
2answers
649 views

how to set list alert using javascript in sharepoint 2010?

I need to set a list alert for current (logged in) user using javascript. var currentcontext = new SP.ClientContext.get_current(); var currentweb = currentcontext.get_web(); ...
0
votes
2answers
177 views

add SPListItem with more than one field of data

I want to add an item to a SharePoint task list, with data in the Title, AssignedTo, and Status columns. The code below adds the item with data in the Title column, but no data in the other columns. ...
1
vote
0answers
65 views

External lists: Field GUIDs always empty?

I want to turn an external list into a DataTable using the ID/GUID values of external list's Fields as the DataTable column names; however, I've noticed for the external list I'm using, all of the ...
0
votes
1answer
157 views

How to use dynamic or relative path in SPList object?

I am using the following code to read a picture library: SPList list = SPContext.Current.Web.GetList("http://win-12/sites/mysite/ImageLibrary") Problem is, in above code "win-12" is my machine name ...
3
votes
4answers
328 views

SharePoint List / Library property bag

I'm working with sharepoint 2007 and i have a question, does a sharepoint library / list has something like property bag, where i could store some properties for the list? Like a SPWeb object. Or ...
1
vote
0answers
70 views

Remove ECB from XsltListViewWebPart

I have created XsltListViewWebPart programatically. I want to remove ecb on list items, I know this can be done by changing xsl of the webpart but I am getting null in it. Is there any way to do this? ...
1
vote
0answers
131 views

Append Changes to Existing Text of Multiline of text field set “No” after create new site from template

Description: i have a site, and it contains a list. in that list, multiple line of text description field. set append changes to existing text of that description field is "Yes" now i creating site ...
1
vote
1answer
82 views

give user full rights on a list via powershell

I have messed up my rights on a list, so I can still view it, but cannot edit it. I need full permissions on it again. Is there a way to set my admin account back to full rights via powershell? ...
0
votes
1answer
218 views

How to retrive sharepoint list data using Search query in sharepoint 2010?

Currently i receiving data from sharepoint list using CAML and Linq. but now requirement is to retrive data from sharepoint list using search query. can anyone give examples or good articles to ...
0
votes
1answer
37 views

Is there any programmatic way to determine if a list has any relationships to other lists?

If list A has a SPFieldLookup to list B is there any thing in list B's SPList object to show the relationship with list A? While I can flip through list A's fields and find the relationship to List B ...
3
votes
2answers
994 views

Using PowerShell how do I change the column ordering for a SharePoint List

Been trying to search for the answer to this, what I need to do is re-order the fields of a SharePoint list and propagate that change down to 300+ sites (should have used a content type, but oh well) ...
0
votes
2answers
925 views

Creating SSRS report in SharePoint 2010 with multiple SPLists

I have SP Lists Students: StudentID, Name, Address,Email Course: CourseID, Name, Duration, Fees StudentCourse: StudentID, CourseID How can I query these lists and create a SSRS report displaying ...
0
votes
1answer
57 views

Display a list as readonly regarless of permission level

I am currently trying to display a list view outside of its site collection. This has been done using String str = mySPView.RenderAsHtml(); Controls.Add(new LiteralControl(str)); Since it is ...
1
vote
0answers
168 views

SPSiteDataQuery without subfolder items?

I'm trying to use the SPSiteDataQuery to return the contents of several lists across a site collection. The problem I'm having, though, is that while there are only a few documents at the root level ...
1
vote
2answers
811 views

Add/Copy SPListItem object to Sharepoint List

explanation: I have fetched list items based on conditions. Like this. var query = from SPListItem oItem in splist.Items where ...
1
vote
1answer
1k views

How to Set SPQuery.RowLimit to get all items?

I'm using my SPList View to get the html code of extracted items by an SPQuery over the listview SPList myList = mySite.RootWeb.Lists.GetByInternalName("ListINStr"); SPView oView = ...
0
votes
1answer
430 views

Sharepoint Designer SPList option “Hide from browser” in code?

When I hide the list using list.Hidden = true; It's hidden from the Quick Launch and it's also hidden from the Sharepoint Designer. I'm rather interested in a useful feature for lists in ...
5
votes
2answers
316 views

SPQuery returning different before and after using RunWithElevatedPrivileges method

I am having a huge problem here. I am executing a query looking for a SPListItem, when I execute this query with user identity it works well, retuning the fields "Author" and "Editor" that I need. ...
2
votes
1answer
487 views

SPField not visible on default view when SPList created programatically

I'm creating an SPList item programatically. Everything goes fine, I add a list, I add spfields to it. SPList list = (SPList)oWeb.Lists[listName]; SPField libraryNameField = new ...