Tag Info

New answers tagged

2

Based on your updated question. You can change the following <Query><OrderBy><FieldRef Name="ID"/></OrderBy></Query> To <Query><OrderBy><FieldRef Name="Modified" Ascending = "False"/></OrderBy></Query>


1

In case someone has same requirements (and restriction). As it seems that you are confident with js,ajax,html. I would go for list REST service. You can access this service via /_vti_bin/listdata.svc and to access a specific list you can send a GET with the following URI: /_vti_bin/listdata.svc/{listname} this will return all rows but since its an OData ...


0

Remove all the whitespace from your ViewFieldsOverride property, it should be all on one line. The following code block is taken from the SPSiteDataQuery (which is used internally to retrieve the data) during XML validation: try { while (SPSiteDataQuery.ReadRootXmlElement(xmlReader)) { ...


0

We solved this problem by not using Visual Studio's regular Service Reference being added. Instead we added a Web Reference (as explained here, http://msdn.microsoft.com/en-us/library/bb628649.aspx). Essentially you do the following: To add a Web reference to a project In Solution Explorer, right-click the name of the project that you want to add the ...


1

One way of doing this is by adding JavaScript to the master page or to the page itself. And handle the on load event. In this event you can check if the browser is mobile version function mobilecheck() { var check = false; ...


0

@Ronak, here is the script: <script type="text/javascript"> $(document).ready(function () { // Hide all Add new button links on the page. $('[id^="Hero-WPQ"]').hide(); }); </script>


0

I have dozens of dashboard pages that include List View web parts with custom permissions. They all display as expected. The reason you see this error is because of poorly implemented permissions on lists and libraries. When breaking inheritance at this level you should ensure that default reader groups have the Limited Access permission level applied. You ...


0

I am not sure you can add code directly to SharePoint, rather you convert it to Html and then display it pages, blog, wiki etc. I think you should check if their is any 3rd party tool who can convert you code into Html then you add that into your sharepoint.


0

I found out what was happening for me. When I did my query I was only querying the Main Data source and did not include the GetUserProfileByName data source in my query.


1

We had the same problem in our environment couple of months of ago, when ever you try to update the solution it says successfully deployed but still no changes showed. Almost same steps we followed as you mentioned. Finally we use some tool to check which Dll load in the Timer services and here we found our problem. SO in our case easy fix was Restart ...


0

Hi use the code i am posting, it works for me. I am using SPServices to get the current user name, Please download the SPServices Library from codeplex and refer it propely in your code and then use this code. Put your code in newform.aspx var userName = $().SPServices.SPGetCurrentUser({ fieldName: "Title" }); ...


3

user19952 has the easiest (and probably best) method, however as you can see from their screenshot there can be many web parts on one page, and it can be hard to differentiate which is which if you're not already familiar with the web parts. If you want to use the ID to find exactly what the web part is, you can use Powershell: $site = Get-SPSite ...


12

You can always add ?contents=1 to any url in SharePoint to see what specific webparts that are used in the site/page. Example: 'http: //test.sharepoint.com/Pages/default.aspx?contents=1'


0

You need to use querystrings to get the webpart properties, as used in this example: <Content Src="~remoteAppUrl/AppPartContent.html?strProp=_strProp_&amp;intProp=_intProp_&amp;boolProp=_boolProp_&amp;enumProp=_enumProp_" Type="html"/> Then you can get that from your javascript: ...


1

You don't say what version you're on, but in 2013 you could use the new Content by Search Web Part. Configure your query template to restrict contentclass to document library and path to include your top level site url


0

Yes, the ClientPeoplePicker will work. I've gotten it to work inside an App Part, actually - here's a quick guide to the HTML/CSS/JS side of things. I took this from an example I found on the web - don't recall the URL but if you google ClientPeoplePicker you'll get some good results. First, you're going to need to include basically every JavaScript file ...


0

1) My Web App URL is not used by any site collection! 2) Web Parts that are scopped at site, should use site collections url. There is great post about enabling feautres that are not visible in web admin section here: Deployed solution does not appear in site collection features. With that I was able to deploy Site scopped solution, and get Feature ...


0

Can't you just edit the web part and change the Selected View option from Current View to Summary View?


1

One way of elevating code is, as you already mentioned, using SPSecurity.RunWithElevatedPrivileges which will run SPSecurity.CodeToRunElevated with Full Control rights. From MSDN documentation of the method for SP 2013 (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx) you can see that this code runs ...


0

Yes in those cases you should elevate the code, do the operation. There is no other way around this.


0

On http://AUrl/, go to Site Settings > Site Collection Features and ensure that your web part is activated


0

I ended up creating a custom WebPart with a ASP Label conponent which text is set to SPUtility.GetLocalizedString("XXX") using (SPLimitedWebPartManager wpManager = web.GetLimitedWebPartManager(welcomePageUrl, System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)) { WPSearchWelcomeMessage webpart = new ...


0

OK I have found it. You have to choose "Other Web Parts" snippet. In my case (Visio Web-Part) the row is the very last one.


0

Check the mode of the page in PageLoad method and perform the action depending on that. Example: In case of web part page if (Microsoft.SharePoint.SPContext.Current.FormContext.FormMode == SPControlMode.Edit) { ltr.Text = "EditMode2"; } else { ltr.Text = "ViewMode"; } If it is a publishing page: if ...


0

I've been able to get document list web parts to open to a specific folder by changing the URL. If you put RootFolder=PATH, the document library will open to that folder. The problem is, it does it for all libraries on the page. But maybe this will get you in the right direction: RootFolder=/PATH/TO/Shared Documents/FOLDER NAME


1

If you want to move your content away from the quick launch, try this: <style type="text/css"> #contentBox { margin-left: 250px; /* default is 220px, so increase to whatever value you like */ } </style>


0

No, web part deployed to SharePoint has to be compiled in 64-bit. http://stackoverflow.com/questions/20710798/microsoft-sharepoint-is-not-supported-in-32-bit-process-please-verify-that-you


0

The code you tried is basically getting the current page's webpart manager and then adding new webpart to it. The ideal solution to your problem is by extending System.Web.UI.WebControls.WebParts.WebPart and overriding CreateChildControls Here is one thread that explains this ...


0

The changes made in the original view will not reflect in the webpart as the copy of the view in webpart is different from original one. Update The sample code to update the view of XsltListViewWebPart. Note that I haven't tested the code. You can create a console app, test the code and then use the .exe in task schedueler // Get refrerence of the page ...


0

You should edit the page and add those document library views. Then hide all of them by default. Handle the click event of the Graphic using JavaScript. Then Show/Hide the library webpart using JavaScript.


0

You can create a View on your Document Library. In the Library click in the top ruban on Create a View. Change the sort by Modified Date / Created Date depending on what you want to achieve. Then change the sort order for ascending or descending. In the end, go back on your HomePage and add a new WebPart using the Document Library. Change the View from ...


0

The DLL you are trying to add is most likely a 32-bit DLL. SharePoint development is done in 64-bit and thus it is not possible to use that DLL in your application. That also explains why SharePoint is not able to load your DLL since you only have the 32-bit DLL installed in your GAC after deployment.


0

After some adjustments and using Google Chrome Console for debug at runtime the page, it shows that even when the selection of which chart generate changes, the Chart Column or Pie doesn't render at all (i.e there's no image) but the code of the chart does. With this modified code, both, the 3D Column and Pie Charts now is rendering: /// ...


0

Instead of using Google's google.setOnLoadCallback(drawChart); event in your javascript, try using _spBodyOnLoadFunctionNames.push("drawChart");. My theory is that by the time Google's API has loaded, your page's DOM has not been fully built, and so there is no "chart_div" to access. Sidenote: I would recommend using the StringBuilder class instead of all ...


0

yes you can, with no problem at all. I usually work that way with no problem, just move the wsp and deploy it. The deploy will stay in the folder 14, not in the 15, for that "problem" you could use the following command: Install-SPSolution -Identity InterviewTestWebpart.wsp -GACDeployment -CompatibilityLevel {14,15} Good Luck


0

No. Unless you copy SP 2010 assemblies and then refer those as part of developing the webpart. Make sure your target framework is v3.5.


0

Your code works fine! it produces the correct result on VS, group MyName‚Äčand MyName match just copied and pasted code! You need to put a break point on this line: if (strName == ConstantHelper.List.MYNAME) and step into the next line, then see why its a missmatch, hover over the two your comparing to see whats being outputted! I bet if you did ...


-1

== is like ReferenceEquals, use Equals instead: if (object.Equals(strName, ConstantHelper.List.MYNAME)) or if (strName.Equals(ConstantHelper.List.MYNAME)) See this article: stackoverflow.com/questions/3678792



Top 50 recent answers are included