Based on the post at http://www.nibble.be/?p=97 I've created a usercontrol following the [DataEditorSetting()] syntax to define config items for the data type, but I'm unable to save changes to these.
public partial class TestClass : System.Web.UI.UserControl, IUScontrolDataEditor {
private string umbracoValue;
public object value {
get {
return umbracoValue;
}
set {
umbracoValue = value.ToString();
}
}
[DataEditorSetting("account ID:", defaultValue = "testID1234")]
public string accountId { get; set; }
protected void Page_Load(object sender, EventArgs e) {
// since Page_Load isn't called when viewing the data type definition, there's nothing to see here - all I'm doing is serializing a string value that I then use in an ajax request
}
}
If I manually updated the values in the DB, the data type reflects the changes, but trying to do so from the back office doesn't work, which makes me think I'm missing something - do I need to define the accessors for each editor setting?
works fine - having given the editor setting and associated property the same name, but I shouldn't have to do that, I wouldn't have thought? Should be fine to have multiple words in the editor setting name?
Saving DataEditorSettings on custom data type
Based on the post at http://www.nibble.be/?p=97 I've created a usercontrol following the [DataEditorSetting()] syntax to define config items for the data type, but I'm unable to save changes to these.
If I manually updated the values in the DB, the data type reflects the changes, but trying to do so from the back office doesn't work, which makes me think I'm missing something - do I need to define the accessors for each editor setting?
And no sooner do I post this, than I find the problem:
won't work, but
works fine - having given the editor setting and associated property the same name, but I shouldn't have to do that, I wouldn't have thought? Should be fine to have multiple words in the editor setting name?
is working on a reply...