And I have successfully created a new data editor with a prevalue setting as well.
Now I would like to allow the user to add several "prevalue" values, exactly the same way that a Dropdown list does. Essentially a list of prevalues that can be easily added or deleted by a developer.
IE.
1) User Create a new datatype: 2) User clicks Save 3) User adds prevalue clicks save 4) User does the same and can now see both values with the "delete" link next to it.
I can't see how this would be set up in the code. I've looked throug the DB and can't work it out there either.
Is that the only config option you need ? Then you can just use a default prevalue provider, take a look at the sourcecode for the dropdown datatype and you'll see how you need to use it
public override interfaces.IDataPrevalue PrevalueEditor { get { if (_prevalueeditor == null) _prevalueeditor = new KeyValuePrevalueEditor(this); return _prevalueeditor; } }
Custom DataType/DataEditor Question
So I've watched the videos at Umbraco TV regarding custom Data Types/Data Editors here:
http://umbraco.tv/help-and-support/video-tutorials/developing-with-umbraco/data-editors/adding-settings-to-your-data-editor
And I have successfully created a new data editor with a prevalue setting as well.
Now I would like to allow the user to add several "prevalue" values, exactly the same way that a Dropdown list does. Essentially a list of prevalues that can be easily added or deleted by a developer.
IE.
1) User Create a new datatype:
2) User clicks Save
3) User adds prevalue clicks save
4) User does the same and can now see both values with the "delete" link next to it.
I can't see how this would be set up in the code. I've looked throug the DB and can't work it out there either.
Any ideas would be excellent!
Thanks!
Evan
Comment author was deleted
Hi Evan,
Is that the only config option you need ? Then you can just use a default prevalue provider, take a look at the sourcecode for the dropdown datatype and you'll see how you need to use it
Ah cool, but where can I find the source coode for this?
Comment author was deleted
http://umbraco.codeplex.com
Comment author was deleted
Basicly it's this part:
is working on a reply...