Tag Info

New answers tagged

0

If you want to avoid creating a result source every time you need a new sort criterion, here's the key: SharePoint uses the following priority when deciding how to sort: Query rules Result source configuration (your solution above) Available sorts in the web part (This is the JSON sorting in the web part's Settings) Sorting order set on the query builder ...


0

In my specific case (in an environment I didn't setup) the event viewer told me that the login failed for the specified user. This may cause a security error, if your adding the account to the database. Resolve it by creating the web application with the designated account.


0

It looks like the webpart is just taking too long so the page is timing out. How long does it take on dev? 90 seconds or more? Typically on a dev environment especially when debugging, the timeouts are adjusted to the max so that the page doesn't timeout while stepping through the code. Maybe try adjusted the standard page timeout in your test ...


0

The previous answer worked, with one minor adjustment public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite site = properties.Feature.Parent as SPSite; using(SPWeb web = site.OpenWeb()) { using(SPLimitedWebPartManager wpManager = web.GetLimitedWebPartManager(page url, ...


1

This might be caused by the way you are looping over the web parts. You are starting at item 0 and counting up, deleting things as you find them. You need to start at the highest number in the collection and count down. Sharepoint moves the web part indices up after you delete an item, effectively skipping what should be your next web part.


0

I figured out a different method. Using the Where-Object filter in my foreach statement seems to work better. The following works every time: #Get reference to the webpartmanager class $webpartmanager = $SPWeb.GetLimitedWebPartManager($pageitem.url,[System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared) #Iterate through the ...


0

Ensure that the service : Microsoft SharePoint Foundation Web Application (using central administration) is stop on your application server it should be better. Sylvain


0

For Always On availability groups: Go for option 2. As this MSDN article explains, you need to point to the Availability group listener name. Refer to the section "Install and Configure SharePoint 2013". For Clusters: I would say option 3, but take into account this: If it's an specific instance within the cluster: DATA ...


0

One follow up note. One of my users deleted a part from his view of the page - the rest of us could still see it. On the Web Part maintenance page there were now 2 instances of the part listed - one open, one closed. Following the above suggestion to add the Closed part would work but would create 2 instances of the part for those of us who hadn't lost it ...


0

My understanding is Excel Web parts are available with Office 365 Enterprise E3 Plan. Once you have Enterprise features turned on you should be able to add the Excel Web Access Webpart fine. See this article for details. You might be also interested in this Technet article. Hope this helps!


0

You may be surprise why you are getting this message though your UpdatePanel is very much on the page. Generally this error comes when you are trying to update an UpdatePanel from code behind and that UpdatePanel is inside an element (parent) that has hidden visibility. Some techies suggest you to use another UpdatePanel as a container of your this ...


2

You can look at this post below, demonstrating how to custom sort your results using display templates. The managed property must also be sortable. http://www.eliostruyf.com/add-sorting-display-templates/


-1

select the webpart and change the <script> in edit html sorce option available in the ribbon


0

You need to override out of the box SharePoint CSS classe's. In master page, take the reference of your CSS file after the out of the box CSS file. <link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/core.css"/> <link rel="stylesheet" type="text/css" href="/_layouts/Amit/styles/AmitKumarCustomStyle.css" />


0

Check your excel settings. Go to File > Excel Options > Trust Center > Trust Center Settings You may find clue for the problem. I had similar issue using Excel and found the solution after i start to explore the Excel security settings.


0

I ended up putting several content editors on the web-part page, and moving the wiki content from the pages in Site Pages to the wiki content of the content editor on the web-part page. Not what I originally had in mind, but at least I don't have to do tricks to get what I want! However, even though this is a solution, it isn't the best solution.


1

If you were trying to display a web part page, you could accomplish this using a page viewer web part, as detailed in my original answer below. However, wiki pages will throw an error if they cannot find the ribbon. Embed a web part page (not a wiki page) using a Page Viewer Web Part When specifying the URL of the page that the page viewer web part should ...


1

Here's a potential solution that involves a Content Editor and jQuery.load(). You can "screen scrape" the section of the source page and stuff it into an HTML element of your choosing on the destination page. It would look something like this: $("#myDiv").load("/SitePages/Blah.aspx .ms-WPBody"); In this example, "myDiv" is the ID of a div you'd place in ...


1

I wrote this code here so I can't guarantee it will work as is. It should get you pointed in the right direction. private Func<string> _func; protected void Page_Load(object sender, EventArgs e) { _func = new Func<string>(GetCurrentUserData); Page.RegisterAsyncTask( new PageAsyncTask( new ...


0

I was able to solve this. Basically I created a new form, and edited the name, list id GUID, and the name GUID as described below. http://itsolutionsblog.net/content/uploads/copy-form-and-edit.png


0

Here is the Example of Horizontal Accordion with jQuery and SharePoint : Horizontal Accordion in Sharepoint


1

Basically you would have to call the function that does that on regular basis using setInterval , but if you would like, here's another plugin that does that for you: Lite Accordion


0

Firstly, if your code is in SharePoint site, there is no need of giving script refernce., because, sp.js will be already included in the Master Page. Infact you can use this as below sample function successHandler(data, textStatus, jqXHR) { SP.UI.Notify.addNotification("Created Successully", false); }


0

In solution explorer : -> Choose Show all files. -> Open file in your module directory with extension .spdata -> Look at <ProjectItemFile> of your page. -> Edit Source and Target attributes.


0

If you need full trust operations in sandboxed code, you can create and use sandbox proxies, as described here, here and here.


1

If you can grab the offending NOBR element via JavaScript, you can then hide it and insert a less offensive element adjacent to it with the same (or modified) HTML content. // 1. grab the NOBR tag via CSS selector var nobr = document.querySelector(".ms-standardheader.ms-WPTitle nobr"); // NOTE: Replace above CSS Selector with one that grabs the title of ...


0

Try wrapping your entire query with {? your query }.


0

Try adding the web part to the page layout using as mentioned here: https://achrafsp.wordpress.com/2013/05/31/provisioning-webparts-declaratively-and-programmatically


1

All you need to do is to add solid to the border-bottom property, so it would look like this: .groupheader { padding-left: 10px !important; padding-right: 5px !important; border-bottom: 1px #000000 solid ; }


0

You can create custom XSL with Custom CSS instead of modifying existing one. Steps to update: 1) First we will create css class: .SingleLine { Border-bottom:1px solid #000000; text-decoration:none; FONT-FAMILY: Arial, Helvetica; font-size:12px; } .SingleLine A, .SingleLine A:link, .SingleLine A:active,.SingleLine A:visited { ...


2

Here is ready to use web part from VirtoSoftware with several data sources including Google Calendar - uses its API and allows you to synchronize as many calendars as you need - http://www.virtosoftware.com/products/collaboration/virto-calendar-for-microsoft-sharepoint Hope it will help you!


4

Please try deleting "Error Web Part" from web part maintenance page. This is your "LightningConductorWebPart" which is throwing error.


1

This is my code for vwp properties: private string _lista = ""; [WebBrowsable(true), WebDisplayName("[some name]"), WebDescription("[some name]"), Personalizable(PersonalizationScope.Shared), Category("some category")] public string _Lista { get { return _lista.ToString(); } set { _lista = value; } } As you can see the only diference with your ...


4

You are trying to read the property values too early in the web part life cycle. The property values are populated from the content database after the constructor has run. If you check the property values in OnLoad or OnPreRender you will see the values you have set in the editor.


1

You can use this 3-rd party web part - Sharepoint Change Password Web Part


0

When the calendar is the leading webpart and the task list is the child webpart, please edit the Task webpart. Expand the "Miscellaneous" area and make sure "Server-Render" is checked. This will connect both webparts as you would expect. Please note: You will lose some functionality. Instant completing a task will no longer work.


1

Using jquery would be fine, but just flip the approach. Instead of hiding the webpart if its empty , make the webpart hidden by default, and visible only when content is available. Here is the approach. Add a Content Editor / Script Editor webpart with CSS code that hides(remember just mark display none / visible false, dont remove) the Discussion List ...


1

The assembly in a sandbox solution does not get deployed to the GAC and it does not run in the regular worker process (w3wp). It instead runs in a separate worker process called the user code process. Sandbox solutions are limited to using a subset of the server object model and the are restricted from accessing anything outside of SharePoint (external web ...


2

You could use the something like const string scriptKey = "jQuery"; if( !Page.ClientScript.IsClientScriptIncludeRegistered( Page.GetType(), scriptKey ) ) { Page.ClientScript.RegisterClientScriptInclude( Page.GetType(), scriptKey, ResolveClientUrl("~/js/jquery.min.js" ) ); } The key to making this work is that you need to include the same key ...


0

First write your logic and deploy a WebPart to a SharePoint site. Add a New WebPart and add the custom WebPart you have developed. Now open the page within a SharePoint Designer. Now Open a Notepad. Now you have to copy the two things. Copy the Register tag within the Page. This will be in the format as shown below. <%@ Register TagPrefix="WpNs0" ...


1

You can use jQuery (or even plain JavaScript) to get the attribute from the generated for the wev part. The only thing you'd need is somethint that allows you to identify this Web Part even from within the main container. If you own the code for the WP, you can add a custom div with and ID or a class (or data-something), get that using jQuery and then ...


0

Hi Tanmay Your Web Part will have an element attribute called webpartid so you can use this to select all Web Parts, like this (jQuery): $('[webpartid]');


-1

There is a great Addin to Powershell ISE by Gary Lapointe that copys any script to into Html formatted text http://www.thelapointes.com/blog/Falchion.PowerShell.CopyAsHtmlAddOn.zip


2

Use a script editor and use the same thing you did in Developer Tools. If you are using a wiki page and want a code-free way to format the entire web part itself, a trick is to place the web part in a table on the page and play with the widths of each column. This can all be done directly within SharePoint. This wouldn't exactly work for what you are ...


1

I'm not sure if I understand what you want, but I think you are looking for the g_ctxDict object. It holds all the "ctx" objects for all your list webparts on the page. for(var prop in g_ctxDict) { console.log(g_ctxDict[prop].listName) }


0

SharePoint List does not have folders, Document Libraries does. As an Example: using (SPSite oSite = new SPSite("url")) { using (SPWeb oWeb = oSite.OpenWeb()) { SPDocumentLibrary oDoc = oWeb.Lists["list_name"] as SPDocumentLibrary; int numFolders = oDoc.Folders.Count; if (numFolders > 0) { ...


0

I tried the approaches from Stefan and from Phil, but I was not able to get them to work for me. My solution was to create a new blog site in my stage environment, then use Sharegate to copy the custom site columns (adding them to the posts library, of course) and then the content from the photos library and posts list. This gave me essentially a mirror of ...


2

I would recommend the following example for loading web parts using JSOM: var ctx = new SP.ClientContext(); var pageFile = ctx.get_web().getFileByServerRelativeUrl(pageName); var webPartManager = pageFile.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared); var webPartDefs = webPartManager.get_webParts(); ...


0

All you have to do is refer to "sp.js" file provided by the sharepoint if sharepoint : 2010: <SharePoint:ScriptLink ID="ScriptLink1" runat="server" Name="sp.js" OnDemand="false" Localizable="false" LoadAfterUI="true"/> or <script src="/_layouts/sp.js" type="text/javascript"></script> <script src="/_layouts/SP.UI.Dialog.js" ...


2

Take a look at VirtoSoftware Sharepoint Calendar Web Part. It has the option you are looking for and much more useful features like integration with Microsoft Exhchange, Google Calendar and even SalesForce Calendar. http://www.virtosoftware.com/products/collaboration/virto-calendar-for-microsoft-sharepoint



Top 50 recent answers are included