Try our conversational search powered by Generative AI!

EditorSelectionEditorDescriptor only works with type string


I'm having troubles getting the EditorSelectionEditorDescriptor to work with the type int. The reason I want to register my own EditorSelectionEditorDescriptor is because I want to send my own properties to a dijit (widget). I only get the EditorSelectionEditorDescriptor to work correctly when saying the type is string. This is how I have configured the EditorSelectionEditorDescriptor. The constructor is always called but never the ModifyMetadata. I have followed this article ->

public virtual int myProp { get; set; }

[EditorDescriptorRegistration(TargetType = typeof(int), UIHint = "myUIHint")]
public class EditorSelectionEditorDescriptor : EditorDescriptor
public EditorSelectionEditorDescriptor()
ClientEditingClass = "assambly.editors.myWidget";

public override void ModifyMetadata(EPiServer.Shell.ObjectEditing.ExtendedMetadata metadata, IEnumerable attributes)
base.ModifyMetadata(metadata, attributes);
metadata.EditorConfiguration["myProp"] = 5;

Thanks for your help!

Sep 12, 2015 13:19


I think that I had similar problem. Maybe you should use nullable integer (int?) instead of scalar value.

I mean:

[EditorDescriptorRegistration(TargetType = typeof(int?), UIHint = "myUIHint")]
Sep 12, 2015 15:07

Thanks Grzegorz, I don't understand why it works now since int? and int are different and I would never have thought of it myself so thanks again!

Sep 12, 2015 15:50
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.