0

I am developing a custom list definition within Visual Studio 2010 for SharePoint 2010, I have ran into a problem with adding a field which will be choice and will use items from another list on the SharePoint site.

I have attempted searching and have only found references to a static list of choices within the list definition schema.

I would imagine a similar approach would also be used for Radio Groups which is another field requirement I have for this list.

If anyone can provide examples or point me to a place which I can find this out I would greatly appreciate it.

1

You can only use checkboxes in a Choice field, but since you need to use values from another list you need to use a Lookup column which doesn't support checkboxes. The lookup field allows multiple values though.

Because none of the above actually match your business requirement, you'll have to develop a custom field which can inherit from the lookup field.

In your custom field you can use a user control (ASCX) deployed to the CONTROLTEMPLATES folder in the SharePoint root to render the New and Edit modes of the control and in that ASCX you can render your checkboxes.

Start here and read all the sub-pages:

  • Thanks Luis, looks like I have some reading to do :) I'll post back when finished. – Lima Jul 1 '13 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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