0

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.

1 Answer 1

0

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.

3
  • 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é
    Commented Aug 19, 2013 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 Commented Aug 19, 2013 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é
    Commented Aug 19, 2013 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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