Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I know how to add properties to a web part and use these value inside the web part.

Can someone tell me how I can add a dependency so that I can only edit a property e.g. when another is checked?

Thanks in advance.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You need to build a custom editor part. Inside this part you can add the code required to change the properties of data entry controls (e.g. enable or disable) and to do data validation while the user is editing the web part property values.

See this blog post by Wictor Wilen for more information.

share|improve this answer
    
Thanks for the link. I was able to create a list using the example. But somehow the settings do not integrate nicely with the other settings. The EditorPart is some kind of too small. Are the directions from the article still valid for SharePoint 2013? –  André Aug 19 '13 at 18:44
    
I'm not aware of any changes to editor parts between 2010 and 2013. When you say the editor part is too small are you talking height or width? The height should scale with the controls but I think the width is controlled by the editor zone –  Rob Windsor Aug 19 '13 at 18:53
    
Height is fine. As you guessed the width is the problem. Anyway you pointed me into the right direction. I guess I can just fiddle around and find my way through it. –  André Aug 19 '13 at 19:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.