Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [splimitedwebpartmanager]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
701 views

How to check if webpart exist on page?

I have already found some solution to check if a webpart exist on a page. But I think it is not ok for the performance. It will loop into all webparts on that page. Is there some best practice ...
Ola's user avatar
  • 4,385
0 votes
2 answers
119 views

Trouble updating list using a custom query

Alright, this is driving me crazy. Ive been searching for a solution for several days but it just seems impossible. To see my updated list with the new query I have too click twice before the webpart ...
Jukke's user avatar
  • 7
1 vote
1 answer
551 views

SharePoint 2013 server API - no LimitedWebPartManager?

I have a SharePoint 2013 development environment. The Microsoft.SharePoint.dll assembly does not contain LimitedWebPartManager. I want to use a sandbox solution to provision a page and the web parts ...
Kieren Johnstone's user avatar
0 votes
1 answer
1k views

Order of web parts programmatically added to SharePoint page

I am adding multiple list viewer web parts to a SharePoint [web part] page using the code below: // Create the object SPLimitedWebPart Manager SPLimitedWebPartManager WebPartMgr = web....
Web User's user avatar
  • 229
0 votes
1 answer
1k views

Programatically adding webparts to a page in sandbox

I've successfully implemented code to add web parts to web part zones in code using WebPartManager's in other projects. Now that I'm working in a sandbox solution, VS can't seem to recognise ...
JᴀʏMᴇᴇ's user avatar
3 votes
2 answers
840 views

Can't hide the Blog Tools web part programmatically on blog site

I have an event receiver that modifies some web parts when a new blog site is created: using (SPLimitedWebPartManager wpManager = clientWeb.GetLimitedWebPartManager(SPUtility.ConcatUrls(clientWeb.Url,...
Peter's user avatar
  • 177
1 vote
2 answers
563 views

webpart.zone = null, why?

I have this code: using (SPLimitedWebPartManager mgr = page.GetLimitedWebPartManager PersonalizationScope.Shared)) { foreach (System.Web.UI.WebControls.WebParts.WebPart wp in mgr.WebParts) { ...
SharePoint Freak's user avatar
3 votes
1 answer
5k views

How to add Client Web Parts (App Parts) to a page from JavaScript CSOM?

We're working on a custom way of adding and deleting Web Parts and App Parts to a page in SharePoint 2013. We have to use the new App way of developing and all code has to be using the JavaScript CSOM....
LeonZandman's user avatar
3 votes
3 answers
14k views

Creating an XsltListViewWebPart programmatically: Columns & toolbar

I add an XsltListViewWebpart to a page in an event receiver like this: public void CreateWebPart(SPList documentsList, SPLimitedWebPartManager wpm) { var documentsWP = new XsltListViewWebPart(); ...
Kenneth Van Coppenolle's user avatar
0 votes
1 answer
2k views

ZoneID of the zone to which the wp is being added

How do I find out the zoneID of the zone where my custom webpart is being added? Have tried few things including this one. AnotherWP.ZoneID = ((WebPart) mgr.WebParts["ControllerID"]).Zone.ID; But it ...
Hna0002's user avatar
  • 143
1 vote
1 answer
2k views

SharePoint: how to update webpart that's substituted by ErrorWebPart

We are having problems with our CQWPs when deploying our site to another environment. So the original issue was, the ListGuids are different on each environment so the CQWP throws an error after ...
Mel's user avatar
  • 193
0 votes
1 answer
1k views

Html Form Web Part - what is the corresponding class?

I need to add a HTML Form Web Part to a SharePoint 2010 page programmatically in a feature receiver, but I can't find the class to instantiate.
elsni's user avatar
  • 471
2 votes
1 answer
677 views

Setting the value of a custom web part property using object model

Let's say I have a reference to a web part that I got by using a SPLimitiedWebPartManager. How can I set the custom properties of that web part? For example, if it is a stock ticker web part, how do I ...
TehOne's user avatar
  • 381
0 votes
2 answers
579 views

SPDisposeCheck on SPLimitedWebPartManager ImportWebPart method

(This question is related to MOSS 2007. Might also apply to Sharepoint 2010) I have run SPDisposeCheck v1.3.1 to detect memory leaks in a solution. There is one issue found that I can't seem to ...
user avatar
0 votes
1 answer
140 views

ListViewWebPart in visualwebpart

I have visual web part,on that web part i have a text box and a button. User enters some value in text box and clicks button (which actually makes a service call). I get the data, my requirement is to ...
user avatar
0 votes
1 answer
1k views

Hide web part using SPLimitedWebPartManager

I'm trying to make a web part that is managing other web parts in the solution. I need it to be able to hide other web parts based on user input. Since I can't use connections I'm trying to do this ...
gaotter's user avatar
  • 588