Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom-web-part-property]

The Web Part base class contains a set of properties that you and the users of your Web Part can use to control its appearance and behavior. For example, a Web Part's Height and Width properties can be set by your code, the user, or the Web Part definition file (.dwp) you use to import a Web Part. A custom property is a property that you create when you need additional properties to enhance your Web Part's functionality.

0
votes
1answer
17 views

Hide one of hosted app part from solution

I have developed a solution which have 20 SharePoint hosted app part. Now i want to hide one of the app-part from this hosted app solution, so that user can not see and add that one app part on page. ...
2
votes
0answers
56 views

Unable to create custom Web part properties for custom content search web part in sharepoint 2013?

I tried to create custom web properties for custom content search web part Extended CSWPby using [WebBrowsable(true), WebDisplayName("Page Title"), WebDescription("Title displayed on the page"), ...
2
votes
1answer
309 views

Custom radio button property for SharePoint web part

I have created Custom property for string and drop down list . Currently I'm trying to create radio button custom web part property. Custom property name will be City 2 radio button will be Las ...
2
votes
1answer
103 views

Add same webpart multiple times on a webpage

I have a webpart i need to add multiple times on a webpage, how can I restrict in javascript the the variable to read from each webpart property? In webpart ascx file, I have hidden fields like: &...
1
vote
1answer
46 views

Web Part with a Custom Tool Part error "Sorry this site is not shared with you”

I created Web Part with Custom Properties My issue is that only the admin profile can edit the properties Users with contributerole can't edit the webpart. He gets this error : Sorry this site is ...
1
vote
1answer
1k views

Populate Custom Web Part Property from List

I have a custom web part (Contact Info) with a property (Topic). The topic is a drop down list (ie behind the scenes its an enum type. What I would like is for the values of this dropdown property to ...
3
votes
2answers
2k views

Getting custom webpart property with JSOM

I have a webpart with a custom property setup like so: public static string TargetUrl; [WebBrowsable(true), WebDisplayName("My DisplayName"), WebDescription("My Description."), Personalizable(...
0
votes
1answer
230 views

visual webpart custom properties not working

I am trying to create visual webpart custom properties but it is not appearing. my code: <?xml version="1.0" encoding="utf-8"?> <webParts> <webPart xmlns="http://schemas.microsoft....
0
votes
2answers
2k views

Create a custom dropdown in webpart property that loads values from a list

I want to create a custom webpart property which will be a dropdown list. and i want to load values from a sharepoint list. So far i could only find a way to provide static values for list contents. ...
4
votes
2answers
9k views

How to get web part id

This is a follow up question to the one i asked earlier : Reading web part properties using javascript object model In my earlier question I had been able to access the properties using jsom but i am ...
0
votes
0answers
26 views

Things to lookout for, when adding a button to the properties menu of a webpart and even handler not executing

Ive built a custom Web Part properties menu, using a class which extends the Editor Part following this tutorial . I created a button with the following code this.testButton = new Button(); ...
3
votes
3answers
3k views

Missing my custom webpart property, what did I miss in my code?

I am using SharePoint 2013. I developed a visual webpart in visual studio 2013. I have added this code in the code-behind of my webpart: public partial class VisualWebPart1UserControl : UserControl { ...
0
votes
1answer
614 views

color picker in custom webpart properties

I want to have custom color picker in web part properties to let users select colors for headings. Any idea how to achieve this.
2
votes
2answers
2k views

Use a Managed Metadata Field as custom property of a WebPart

I'm trying to add a custom property to a WebPart to select multiple terms from a TermSet in SharePoint 2013. I have found this article: http://msdn.microsoft.com/en-us/library/dd584178(v=office.11)....
2
votes
2answers
567 views

Web part custom properties are cleared after save - until page refresh

I have noticed a bug that occurs on all custom web parts I created. Let's assume I have following web part (sandbox solution) with two properties: using System; using System.ComponentModel; using ...
1
vote
2answers
1k views

Add RichtextBox editor in webpart properties

I have a requirement to add a rich text box in the custom properties of web part. Is it possible to add the rich text editor in custom properties of web part. The following links tells it is not ...
3
votes
1answer
681 views

Visual Web Part Property Validation in Sandbox Solution [SharePoint Online 2013]

How can I validate a custom web part property in a Sandbox solution (SharePoint Online 2013 environment)? I am throwing a WebPartPageUserException when validation fails, as shown below. private ...
1
vote
2answers
314 views

How to fetch all list titles in editor part of web part?

I want to fetch all the list titles of the current site in a dropdown in my web part's editor part. Based on this selection I want to show list items in web part when Apply is hit. My web part is ...
0
votes
1answer
671 views

Create Password Field in webpart properties

I have created a custom web-part. this web-part have a custom web-part properties. i want a Password field in this property. How can i do this ? Any help will appreciated ..
2
votes
1answer
501 views

Setting the value of a sandbox web part's custom properties in .webpart file

I've created a new web part in a sandbox solution. This web part has a custom string property called 'PetName'. I'd expect to be able to set the initial value of this property in the .webpart file. ...
2
votes
2answers
1k views

Question about webpart properties

How can I access a custom property in my webpart? I have a page that contains webparts, which contains multiple instances of the same custom webpart. I wanted to use the .webpart file to add my own ...
0
votes
1answer
64 views

WebPart Properties

I would like to manage my WebPart Properties. I would store an ID -> this id is the id of a configuration for my webpart. First: How can i Store it? Second: How can i Find it? I'm using the ...
0
votes
1answer
214 views

Custom webpart property with mutiple fields

I have written a web part that has 3 extra properties that are all related. Right now each has its own title & input field. Is there a way I could make it 1 title with 3 fields? I was not ...
0
votes
1answer
294 views

Custom Web Part Properties in SharePoint 2010 Visual Web Parts-How to set it different for each user login

I have custom webpart properties for a visual webpart. This thread helped me develop the custom webpart properties. Now my issue is once a user sets the custom property it gets applied for all users, ...
1
vote
0answers
1k views

Custom Web Part Properties in SharePoint 2010 Visual Web Parts-Dynamic Dropdown

I want to have a custom webpart property with a dynamic dropdownlist (data coming from sharepoint list). I was able to make a static dropdownlist as mentioned here. Can anyone help me how to make a ...
0
votes
2answers
688 views

Does web part property validation only work for visual web parts?

Suppose I define a web part property like this: private string _myString = "default value"; [WebBrowsable(true), WebDisplayName("My string"), WebDescription("A simple bit of text to ...
0
votes
1answer
190 views

How Can I Have Multiple Editor Part Collections?

I have created a web part in SharePoint 2007 which has over 40 controls and I was able to make two different Tool Part classes to hold the different sections of the custom controls. I am converting ...
2
votes
1answer
657 views

Pass Parameter to specific instance of Web Part with GetLimitedWebPartManager

I'm passing parameters to a WebPart from a textbox to have a better UI experience for a personalizable WebPart which in this case takes the form of a twitter feed. The problem I have, is in the ...
2
votes
2answers
1k views

sharepoint webpart property disappear after a day (C#)

I developed a custom webpart with a webpart property with some textboxes and it works partially. If I deploy the project, the written text in the property is away. This is ok. But my MAIN Problem is,...
0
votes
1answer
87 views

Add web part properties in separate file

I am developping a web part that customizes the SharePoint Ribbon (hide or show buttons). Can I store some properties in a separate file? If the web part is active on three sites, I should have three ...
2
votes
2answers
470 views

Webpart with custom properties - cancel does not work

I have implemented a webpart with custom properties in an editor part. If I click apply or ok, the values are successfully updated (code in OnPreRender). The problem is now that if I click apply and ...
2
votes
2answers
2k views

Custom webpart to set and get Property per user (PersonalizationScope.User)

I am trying to create a custom webpart in point to set and get a property per user on page. To change the background and save it per user. I'm using code like this: public static string SampleColor=...
0
votes
2answers
283 views

Does webpart property validation code execute every page load

I have a custom webpart with custom webpart property. I have created a complex validation in the property. My question is, does this validation execute on every page load or happens only when ...
0
votes
1answer
1k views

Set web part custom property when adding to page from code

We have a solution that adds All Assignments Web Part from Sharepoint Learning Kit into a page. Here are code snippets we use to do that: public static string AddWebPartToPage(SPWeb web, string ...
3
votes
1answer
377 views

Custom SearchPage in SearchBoxEx Control

I was pushed to replace the default search box in a site collection with a customized one. At the moment it looks like this: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <...
3
votes
2answers
733 views

Is it possible to swap out urls pointing to MySite with urls to custom pages?

We've developed a custom userprofile page for a costumer. This page is supposed to be linked to by all default sharepoint buttons and links pointing to the MySite. One example is the SharePoint ...
3
votes
2answers
2k views

Is it possible to access the web part properties from a dialog?

In my web part I use the create_DialogOptions JS function to create a new aspx site as a dialog box. That works fine. Now I would like to have access to the custom properties from the web part. I ...
1
vote
2answers
3k views

Custom properties in XSL

Is it possible to pull the value of a property, from a web part into XSL? I need to build something similar to the standard Summary Link Web Part, but would like to extend the default control with ...
2
votes
2answers
2k views

How to Show the loading message

i am working on a custom web part where i have a few dropdowns in the tool pane so it take a while to load the dropdownlist and i have total three dropdownlist... i need to show the Loading message ...
2
votes
1answer
705 views

PageViewer setting Height/Width

i am creating a dynamic Page Viewer web part from the user control code behind .. something like this: PageViewerWebPart oWebPart = new PageViewerWebPart(); oWebPart.ContentLink = WebPart....
4
votes
1answer
11k views

Setting default value for custom webpart property

im trying to set a DefaultValue for my custom webpart property.. namespace Beraterprofil.VisualWebPart1 { [ToolboxItemAttribute(false)] public class VisualWebPart1 : WebPart { ...
0
votes
2answers
108 views

MSDN example scenario

I am working with the MSDN example scenario creating creating a custom web part. Can anybody tell me why is it showing the square bottom div below (see in the image). It says "Bottom" and it ...
1
vote
1answer
201 views

Changing WebPart Custom Property

I want to change a string inside my Code using the customization for the WebPart. Currently I created a custom WebPart Property like this: [WebBrowsable(true), Category("Miscellaneous"), ...
1
vote
3answers
8k views

Sharepoint 2010 and Saving variables in VIEWSTATE

UPDATE1 I tried with EnableViewState in Page directive: but no avail. End I am running as a usercontrol in sharepoint. (using SmartPart) Everything's fine. Just the Viewstate-Variables! The ...
0
votes
1answer
666 views

how to access or have reference using web parts?

public partial class VisualWebPart1UserControl : UserControl { public string SetId{ get; set; } protected void ddl_SelectedIndexChanged(object sender, EventArgs e) { SetId = ddl....
0
votes
3answers
4k views

SP 2010 The maximum number of Web Parts for all zones on this page has been exceeded

I am developing SharePoint web parts and as soon as I click on the left navigation to add a web part to the page I get the below error. I am using SP 2010 VS 2010 Server Error in '/' Application. --...
4
votes
2answers
24k views

A Web Part or Web Form Control on this Page cannot be displayed or imported

I'm working on Create a Custom Web Part i'm able to do a build and run the new project in debug mode. However, after trying to add the new web part to the site, I get the following error. "A Web Part ...
1
vote
2answers
2k views

custom editor web part - disappears other property

Update: protected override void CreateChildControls() { // autopostback ddlTopic = new DropDownList { CssClass = "...
1
vote
2answers
2k views

Sharepoint 2010 Custom Properties via WebPart UserControl

I have a weather UserControl (defaulting to the headquarters location) . I have removed the ability to "Edit Web Part" because of branding and not wanting to have to train users on how to work the "...
0
votes
3answers
995 views

Cascading DropDownList in Custom Editor Web Part using SharePoint 2010

Does anybody know how to achieve a cascading dropdownlist in an editor web part?