Datatype from UserControl, DataEditorSetting, System.InvalidCastException
Hello
I am trying to add a new Datatype from a UserControl.
Just to get the basic working I started out with an example from the web
[DataEditorSetting("Statuses", type=typeof(umbraco.editorControls.SettingControls.Values), description="Enter list of possible statuses")]
public string GetStatuses { get; set; }
But when I make a Datatype from a usercontrol with the code above, which is equal to the example im following, I get "An object of the type ASP.usercontrols_testMyUserControl_ascx cannot be converted to the type umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor."
Hope someone can tell me what I am doing wrong here.
Datatype from UserControl, DataEditorSetting, System.InvalidCastException
Hello
I am trying to add a new Datatype from a UserControl.
Just to get the basic working I started out with an example from the web
[DataEditorSetting("Statuses", type=typeof(umbraco.editorControls.SettingControls.Values), description="Enter list of possible statuses")]
public string GetStatuses { get; set; }
But when I make a Datatype from a usercontrol with the code above, which is equal to the example im following, I get "An object of the type ASP.usercontrols_testMyUserControl_ascx cannot be converted to the type umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor."
Hope someone can tell me what I am doing wrong here.
Thanks
Inherit from IUsercontrolDataEditor:
public partial class MyUserControl : System.Web.UI.UserControl, umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
Comment author was deleted
Indeed, you can find an example here http://www.nibble.be/?p=97
is working on a reply...