AI OnAI Off
this blogpost pointed me in right direction to get rid of the error!
http://jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-properties/episerver-how-to-render-a-list-of-objects-in-a-page-or-block-propertylist-explained
Hi,
I have small problem.
im tryion to create my own
public class ChoiceElementBlock : SelectionElementBlockBase
but instead with own OptionItem
public class CustomChoiceElementBlock : SelectionElementBlockBase
well the problem is it throws:
Type 'System.Collections.Generic.IEnumerable`1[[TestSolution.Core.Models.Forms.CustomOptionItem, TestSolution.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' could not be mapped to a PropertyDefinitionType
i tried to create my own SelectionElementBlockBase -> CustomSelectionElementBlockBase
but the problem is with:
/// Items { get; set; }
[Display(GroupName = "Information", Order = -3000)]
[UIHint("OptionList")]
public virtual IEnumerable
is does not like my new CustomOptionItem for some reason..
i tried to take the original OptionItem
public class CustomOptionItem : IOptionItem
{
[DisplayName("/episerver/forms/contentediting/optionitem/caption")]
[Display(Order = 1000)]
public virtual string Caption { get; set; }
[DisplayName("/episerver/forms/contentediting/optionitem/value")]
[Display(Order = 2000)]
[RegularExpression("([^,])*", ErrorMessage = "/episerver/forms/contentediting/optionitem/containsinvalidcharacter")]
public virtual string Value { get; set; }
[DisplayName("/episerver/forms/contentediting/optionitem/checked")]
[Display(Order = 3000)]
public virtual bool? Checked { get; set; }
}
but still cast same error :(
any idea?
what have i missed, tried to contact Episerver support but nobody answers for one week..
Many thanks in advance!
//Pawel