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

learn more… | top users | synonyms

1
vote
0answers
78 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
191 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
89 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
325 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 ...
4
votes
2answers
1k 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
2k 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
60 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
199 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
1k 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
2k 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
721 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
380 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
634 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 ...
5
votes
3answers
3k views

How to bind dropdownlist from splist column with choice field using C#

Here is my list with name "Department" and name,mobile these are my column name and i want to add to my dropdown list only mobile number(column)plz help me ... SPSite site = new ...
4
votes
1answer
3k views

How to get Attachment URL Programatically From Sharepoint ListItem?

How to get Attachment Full URL Programatically From Sharepoint ListItem? Explanation: I have adding new item with attachment. Now i have to bind that attachment link to grid. When click on that link ...
2
votes
2answers
3k views

Add New Item Link not appear in Sharepoint List

Add New Item Link not appear in Sharepoint List. I logging with admin account(having full control). How to resolve ?
2
votes
1answer
212 views

Will using a `SPList` object derived from a disposed `.OpenWeb()` cause errors?

Will using a SPList object derived from a disposed .OpenWeb() cause errors? SPList list = null; using (SPWeb web = SPContext.Current.Site.OpenWeb("/myweb")){ list = web.Lists["Awesome Name"]; } ...
1
vote
2answers
2k views

GetDataTable from SPListItemCollection

My question is regarding the use of DataTable vs ListItemCollection. Basically I have a small solution, where I have to loop through the items in the list to verify if the items already exists or not. ...
2
votes
2answers
119 views

Getting latest datetime from a splist

I have sharepoint list with data and one of the columns contains date ... how can i programmatically retrieve the latest date, the field is a Date And Time type?
2
votes
2answers
176 views

Retrieving the highest value from list

My question is regarding retrieving a value from a sharepoint list. Basically I have a list with some data. One of the fields in the list is a text field with numbers. So what i want to do, i want to ...
3
votes
1answer
221 views

Update SPList.TemplateFeatureId

I need to update the TemplateFeatureId for a couple of lists in our SharePoint 2010 installation. The current TemplateFeatureId points to a feature that is no longer installed in the farm. Both ...
3
votes
2answers
6k views

How to change internal field name(column name) of sharepoint list?

Can we direct change it from sql database? if yes then how? or any other solution?
1
vote
2answers
245 views

How to create a custom SPList without saving it on the SPSite

I am trying to create a webpart which loads document information from a different application. I want this information loaded into a list which looks like a SharePoint list. I was able to create a ...
0
votes
1answer
728 views

SPDataSource for asp gridView returns nothing?

I'm binding my SPDataSource to an ASP:DataGrid but it returns empty gridview not filled. Here's my aspx file <SharePoint:SPDataSource runat="server" ID="SPTypes" DataSourceMode="ListItem" ...
1
vote
1answer
546 views

How to filter a sharepoint list

I have a custom list called expenses. The list has fields such as user,date,amount etc. I want the user to be able to filter this list by amount e.g. add a dropdown above the list with a search ...
0
votes
0answers
93 views

Proper way to get all lists of a certain type from an entire site collection regardless of current location

I'm creating a webpart that gives the user a feed of any annoucement list in the entire site collection, so they can aggregate data to a central portal. I'm currently using the following, but can't ...
0
votes
1answer
710 views

selected SPListItem in the current list

how to get the selected SPListItems in the current SPList ? I thought I would find a helping property like this: SPListItemCollection mySelectedItems = ...
0
votes
2answers
687 views

How to get a SPList's default edit SPForm programatically?

I have created a new edit form for my SPList via Sharepoint Designer and haven't deleted the old ones. I know how to get all the forms, but how to distinguish default forms from the rest? I can see ...
1
vote
1answer
157 views

difference between item[] and item.fields[]

I want to retrieve let's say the title field of my item so what's the différence between doing these acces methods : SPList myList = properties.List; string mytitle1 = ...
0
votes
4answers
414 views

Safely return all lists in site collection that match criteria

I'm using the following code to get all "Announcement" lists in a Web Applications site collection. Unfortunately, sometimes the current user does not have permission to that site and the page fails ...
0
votes
0answers
1k views

SPList multiple content types - “Column does not exist” error

I'm using the Publishing feature of SharePoint. I have a custom Content Type that inherits from the ArticlePage Content Type, and is bound to the Pages list of a given site. My custom Content Type ...
0
votes
1answer
522 views

New SPField shows in the view of my SPList but doesn't appear in any forms (edit, new)

I add a new column to a SharePoint list (the list is built on a content type) like this: SPField textfield = list.Fields.CreateNewField(SPFieldType.Text.ToString(), "new column"); ...
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 ...
1
vote
2answers
575 views

Sort SPList on derived value of e.g. SPFieldUser column

What I want to achieve is: get a bunch of SPListItems from an SPList, using SPQuery, and have the items ordered by an SPFieldUser column. Just referencing the SPFieldUser column appears to sort on the ...
1
vote
0answers
64 views

SPList Replacelink method

I am trying to find and replace url links in sharepoint lists. The ReplaceLink method(SPList class) does the job for straight forward urls like "www.google.com/test" but truncates the url parameter ...
1
vote
2answers
163 views

Dynamically assemble CAML to call related List Items?

I have good methods in place to get my core List of Posts. Let's say I get the 100 most recent Posts. I'd like to get all comments related to those posts. Comments have a field called PostID that ...
2
votes
0answers
139 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
0answers
42 views

Is my Data Access model acceptable?

I'm creating a SharePoint application and want to do things the right way as often as possible. I'm deploying a series of Lists in a Site Definition, and I want to lock down Data Access to a series ...
2
votes
2answers
257 views

QueryThrottleMode in non-query operations?

I have a big List which I want to empty. Therefore I create a template from that list, delete the list and create a new list from the template I just saved before. I know there are other ...
0
votes
1answer
717 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
274 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
614 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 ...
3
votes
1answer
345 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
2k 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.
10
votes
3answers
13k 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
401 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
135 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
1k 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
715 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 ...