November Happy Hour will be moved to Thursday December 5th.

Setting value of [SelectMany] property programmatically

Vote:
 

I've a string property on my Page with the [SelectMany] attribute, and I need to create the page and fill the property programmatically. 

    [CultureSpecific]
    [SelectMany(SelectionFactoryType = typeof(MyItemsSelectionFactory))]
    public virtual string MyItems { get; set; }

at the moment I'm using the following for setting the value of [SelectOne] properties...

    myObj.MyItem = "99" // where 99 == ContentReference.ID of target page

which works ok, but how do i set multiple values at once?

EPiServer.Shell.ObjectEditing.SelectManyAttribute

#217031
Feb 13, 2020 9:46
Vote:
 

I believe you can join the values with a colon, for example, "99,100,101"

#217032
Feb 13, 2020 9:58
Vote:
 

Thank you, working for me now.

#217037
Feb 13, 2020 12:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.