More in this section

Forums / Developing with Sitefinity / Custom Dropdownlist Field

Custom Dropdownlist Field

2 posts, 0 answered
  1. Joe Page
    Joe Page avatar
    4 posts
    Registered:
    18 Aug 2005
    17 Nov 2009
    Link to this post
    I've run across a lot of posts about adding a custom field to a module, and I think I have things in hand so far.
    However, I have not found a way to add a field that gets its values from a lookup list.
    Example:
    We would like to add a "Type" field to the News module that has a list of values like "Working Paper, Critical Conversation, Report, Meeting Notes, ..."
    So, we would like the person submitting the News record to be able to select the Type of the record from a DropDownList.

    What is the standard way of doing this?
    Add a table to the database ("NewsType") and access it?
    Access an XML file?

    And a second portion to this, is if we want to manage this list of "Types," is there a generic/standard lookup management control or one we can copy from somewhere else to do this?

    Thank you,
    Joe

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Nov 2009
    Link to this post
    Hello Joe Page,

    1. You need to map external templates for the desired view -How to map a view to an external template
    2.  Create a new metakey for the module you are going to customize.
    3. Register a new control that has the same ID as the name of newly created metakey in the mapped template.

    The metakey value will be automatically persisted without adding additional code. You can populate your DropDownList declaratively or bind it to a custom data source.

    Useful links.

    User Manual
    Installation Guide 

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered