How would I be able to create a list field in VS that would be a lookup to select columns from any list?

I would preferably like to have something like the PickerTreeView.aspx, but instead of selecting lists select the lists' columns. Note that I don't want the column's value, I want the actual column.

Would this have to be done with a custom column and by editing my list's forms? (Edit/New)

I'm assuming something like this: http://blog.sandippatil.com/list-item-tree-view-in-sharepoint/ would be helpful to create the tree view.

Any help is much appreciated.


1 Answer 1


How I would approach this is the following:

  1. Create a custom field type http://msdn.microsoft.com/en-us/library/bb862248.aspx. This includes an xml definition and a class inheriting from SPField. Your field type would handling storing some sort of representation of the column as a string (Maybe ListName;ColumnName) and then resolving that representation to the actual list and column.

  2. Create a custom field control for you custom field type http://msdn.microsoft.com/en-us/library/bb861838.aspx. This is a class that inherits from BaseFieldControl, and handles actually transforming your field data into something the user interacts with

  3. Create a custom rendering template http://msdn.microsoft.com/en-us/library/bb862055.aspx. This is the markup that works with your field control to actually render something out.

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.