Custom datatype with usercontrol wrapper and PrevalueEditor
I want to create a custom datatype using the Umbraco usercontrol wrapper (http://www.nibble.be/?p=24). The problem is I also need to set some values in the PrevalueEditor or at least talk with some properties while creating the datatype. I know this can be done creating a custom datatype without the usercontrol wrapper (http://www.nibble.be/?p=62), but I would like to do this with the usercontrol wrapper. Is this possible?
No it isn't possible with the UserControlwrapper. If you want to configure the datatype using the prevalueeditor you must create a "real" datatype. If it's to much work you can consider using a configuration file, but I don't like that solution.....
That is a shame. I hope in a next release of umbraco the usercontrol wrapper can also use the prevalueeditor or at least communicate with its properties. Creating custom datatypes with the usercontrol wrapper is much easier.
So far the best solution I came up with is creating a custom datatype with prevalue editor and then in the DataEditor class load a usercontrol with the following code:
Custom datatype with usercontrol wrapper and PrevalueEditor
I want to create a custom datatype using the Umbraco usercontrol wrapper (http://www.nibble.be/?p=24). The problem is I also need to set some values in the PrevalueEditor or at least talk with some properties while creating the datatype. I know this can be done creating a custom datatype without the usercontrol wrapper (http://www.nibble.be/?p=62), but I would like to do this with the usercontrol wrapper. Is this possible?
Hi Jeroen,
No it isn't possible with the UserControlwrapper. If you want to configure the datatype using the prevalueeditor you must create a "real" datatype. If it's to much work you can consider using a configuration file, but I don't like that solution.....
That is a shame. I hope in a next release of umbraco the usercontrol wrapper can also use the prevalueeditor or at least communicate with its properties. Creating custom datatypes with the usercontrol wrapper is much easier.
So far the best solution I came up with is creating a custom datatype with prevalue editor and then in the DataEditor class load a usercontrol with the following code:
This way the custom datatype works the same as the usercontrol wrapper, but with a prevalue editor.
is working on a reply...