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

IList as a field in a Block

Vote:
 

Hi All,

Very recently I came to know that I could have IList as a field in a Block. Following is the field I have added.

[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
        [Display(
            Name = "Section",
            Description = "Add sections here",
            GroupName = SystemTabNames.Content,
            Order = 6)]
        public virtual IList Sections { get; set; }

        [PropertyDefinitionTypePlugIn]
        public class DishPropery : PropertyList
        {
            protected override MenuSectionBlock ParseItem(string value)
            {
                return JsonConvert.DeserializeObject(value);
            }

            public override PropertyData ParseToObject(string value)
            {
                ParseToSelf(value);
                return this;
            }
        }

With this implementation I am now able to add data but am not able to view the same in Preview/Edit mode unless I publish the block. Is the code missing something?

#148861
May 25, 2016 13:10
* 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.