I'm trying to create a DataTypeDefinition using a custom property editor located in the "App_Plugins" folder. Here's the code:
IContentTypeService cs = ApplicationContext.Current.Services.ContentTypeService;
ContentType ct = new ContentType(paterntId);
ct.Name = name;
ct.Alias = alias;
ct.AllowedAsRoot = allowedRoot;
PropertyGroup tab = new PropertyGroup { Name = "Contents", SortOrder = 0 };
ct.PropertyGroups.Add(tab);
var cGridDtd = new DataTypeDefinition(-1, "ContentsGrid");
ct.AddPropertyType(new PropertyType(cGridDtd), "Contents");
cs.Save(ct);
ContentsGrid is my custom property editor. I get the following error : "System.NullReferenceException: 'Object reference not set to an instance of an object."
DataTypeDefinition with custom property editor
I'm trying to create a DataTypeDefinition using a custom property editor located in the "App_Plugins" folder. Here's the code:
ContentsGrid is my custom property editor. I get the following error : "System.NullReferenceException: 'Object reference not set to an instance of an object."
Any suggestions? Thanks in advance
is working on a reply...