Hot answers tagged

22

Both the description and the solution of your issue can be found here : Unable to Open PDF Directly from SharePoint 2010 ([Link edited on 11/20/2013]. Basically, it's a security feature (that can be disable, if you accept the implication), that prevent some files to be displayed in the browser directly. Typically, what would prevent someone to put some ...


19

Since you are using SharePoint 2013 I would recommend you to consider the following approach. In SharePoint 2013 was introduced a so called Client Rendering Mode (CSR) which is intended for rendering of List Views and Forms using HTML and JavaScript and which is a default rendering mode. About View selector menu As part of CSR ClientPivotControl control (...


16

I know you can do this in 2010 but cannot remember on 2007. If you go to list settings and into Advanced Settings there is an option there to only allow users to see and/or edit their own items. If you set this to only being able to edit their own but can see all then you can use a filter where Created By = [Me] on the views you want to control.


11

Modify the view and select "Title" column instead of Title (linked to item with edit menu) . If you want Title column to be clickable, which opens the item itself then select Title (linked to item) column. For Library use Name (linked to document) column if you need to open the document on click of name.


10

Have you tried using [today]-180?


9

In the Filter settings of a View you can only use [Today] as is, you can do simple +- calculations but you can not use Functions. Remember: Do not add spaces in your View Filter calculations: [Today]-7 So you need to add two Calculated Columns calculating january1st =DATE(Year([YourDate]),1,1) and december31st =DATE(Year([YourDate]),12,31) and then ...


8

Get the web and list: $w = Get-SPWeb http://localhost $l = $w.Lists["My list"]; This is how you select the view "All items": $view = $l.Views | ? { $_.Title -eq 'All items' } Then just add fields: $view.ViewFields.Add($hereGoesFieldName); And update view: $view.Update();


7

If you have SharePoint designer, open the view with it and change the settings "read only" to FALSE and then you will be able to modify the views from SharePoint.


7

Edit that page Edit web part Pages Under Miscellaneous check Disable view selector menu Click OK and Save page. :)


7

If you have a SharePoint task list where the task is assigned to a SharePoint group, you may notice that the My Task list does not show tasks even if you are a member of the group of which the task is assigned. Fortunately, there is a simple fix. It does require SharePoint Designer though. Open SharePoint Designer and then open the My Tasks view of the ...


7

Below is the javascript for JSLink(display template) file which does the custom sorting. You need to modify the 'viewNames' array to include the view names for your list. Add them to the array variable in the order you wish to see them on your page. You need to edit the webpart properties and add a link to this JSLink file for each view page if you want the ...


7

Try below code. It fetches all items from My Tasks view. using (SPSite site = new SPSite("https://sitecollectionurl")) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists.TryGetList("Tasks"; if(list!=null){ SPView view = list.Views["My Tasks"]; //custom view name SPListItemCollection items = list....


6

This is one of the limitations of an external list; there is no way to get a datasheet view with the built in functionality of SharePoint. Other limitations are quite well ennumerated on this blog post. As you can see, there are quite a few of them and it is worth bearing these in mind when designing solutions with the Business Connectivity Services.


6

Go to your browser and click the arrow to modify the web part. Expand the Advanced Section and replace the Title URL with your desired URL.


6

I do not think that can be done. It shows the 4th view only once we click on it. (Dynamic HTML) But I found a workaround. Go to Edit Page. Click on Add web part and add a content editor with the links to all 4 views. Edit list view web part and disable the view selector menu. Also if needed, set tool bar to no tool bar and remove search. (Look where to ...


6

SharePoint 2010 Use ClientContext structure that is generated on the client-side and contains List View details: //find active View Id function getCurrentViewId(listId) { var viewId; for(var ctxKey in g_ctxDict){ var curCtx = g_ctxDict[ctxKey]; if(curCtx.listName == listId){ viewId = curCtx.view; break; } } return ...


6

You need to add two calculated columns that will work out the start and the end of the month. (This example uses [Due Date] but you can use any date/time column) "Start of Month" =DATE(YEAR([Due Date]), MONTH([Due Date]), 1) "End of Month" =DATE(YEAR([Due Date]), MONTH([Due Date])+1,1)-1 Then you setup a filter in your view for... "Start of ...


5

You do the following to reorder fields in wild lists: Create an array of the fields order (Or spreadsheet/xml file I use spreadsheets) Delete the viewfields with SPView.ViewFields.DeleteAll() Loop through the array for the order you want (or spreadsheet which is what I use) and add the field in question SPView.ViewFields.Add(FieldName); SPView.Update() ...


5

You could use Client Side Rendering (JS Link) and the OnPostRender property. When you use a filter in the list view it will trigger the OnPostRender again. Check out this article for more information. Code example: (function () { var overrideCtx = {}; overrideCtx.OnPostRender = []; overrideCtx.OnPostRender.push(function() { ...


5

The following CSR template demonstrates how to customize the appearance of menu options in list view, in particular in the example menu options are displayed sorted by title in descending order: SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ 'Templates': { 'Header': renderHeaderTemplateForDocuments } }); function ...


5

Get sharepoint list items by view name: using (SPSite site = new SPSite("http://siteURL")) { using (SPWeb web = site.OpenWeb()) { // Get data from a list. string listUrl = web.ServerRelativeUrl + "/lists/tasks"; // List URL SPList list = web.GetList(listUrl); SPView ...


4

Assuming that customerListView.aspx is a web part page, you can add a Content Editor Web Part on that page and add following as content of that web part. <style type="text/css"> body #s4-leftpanel { display: none; } .s4-ca { margin-left: 0px; } </style> This is documented in several blog posts on the internet.


4

Since you didn't provide version information, I'm assuming that you have SharePoint 2010. So, you have two links for adding a new item there: Add new item link under the list view New Item button in ribbon I reckon the most right way here is to change these two links and provide the same query string parameter ('Name') from the view page along to the New ...


4

Are you just doing this on a field by field basis? If so then you can override the rendering template for a particular field using fldtypes.xsl files. Drop these into templates/layouts/xsl and they magically work. So if you had a custom field called MyBigField, you can define an XSL just for displaying that field value in a list. More info here:- http://...


4

The checkboxes are in the section of the webpart view called "Tabular View" Edit Webpart -> Edit the Current View -> Tabular View Section -> Allow individual item checkboxes


4

No The only way to do this would be creating a separate page for each "audience" which are security trimmed. You can then place a List View Web Part on each page which contains your custom view. Of course, the challenge then is providing appropriate navigation :)


4

I found the way to make it work: overrideCtx.Templates.Group = CustomGroup; function CustomGroup(ctx, group, groupId, listItem, listSchema, level, expand) { var html = '<div style="float:left">' + listItem[group] + ' : </div>'; return html; }


4

Add after </Where> <QueryOptions> <ViewAttributes Scope="RecursiveAll" /> </QueryOptions> Reference: Need a CAML query to "show all items without folders" in sharepoint list view.


4

This might classify as more of a work-around than a solution, but I used the guid of the view as the webpart id. I decided to look into the content database to see how views are stored. In the stored procedure proc_CreateView I found that views are actually stored in the AllWebParts table with the ViewId inserted into the tp_ID column. So I added the ...


Only top voted, non community-wiki answers of a minimum length are eligible