Developer forum

Forum » Development » How to create options for itemfield of type dropdownListEditor

How to create options for itemfield of type dropdownListEditor

Lars Larsen
Reply

Hi,

I have been struggling with creating options for an itemfield of type dropdownlisteditor through the API (Code First). I have created the item "ItemEntry1" with just one field (Categories) of type dropdownlisteditor:

public class ItemEntry1 : ItemEntry
{
    [Field("Categories", typeof(DropdownListEditor<>))]
    public IList<string> Categories { get; set; }
}

 

The options in the dropdownlisteditor would I like to create by code too. But how is that done? Does anyone have an example of how to do this?

 

 

 


Replies

 
Lars Larsen
Reply

Hello,

can't someone help?

/Lars

 

 

 

 
Merethe Nielsen
Reply

Hi

Sorry for the delayed reply.

I have contacted a developer that will check this through the API. I'll return tomorrow with an answer from him.

Kind regards,
Merethe


 

 

 

 

 

 

 

 

 
Lars Larsen
Reply

Thanks Merethe, I will look forward to that :-)

 
Merethe Nielsen
Reply
This post has been marked as an answer

Hi Lars,

I have bad news. The developer found out that you can´t add options through the API (code first approach) as it is now. 

I have created a feature request (TFS 13797) for this, but I can´t give you a time for when it´s implemented. It has to be prioritized by our product manager first.

Kind regards,
Merethe

 

 

 

 

 

Votes for this answer: 1

 

You must be logged in to post in the forum