Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 05, 2009 @ 14:41
    Jeroen Breuer
    0

    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?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 05, 2009 @ 14:48
    Richard Soeteman
    1

    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.....

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 05, 2009 @ 15:10
    Jeroen Breuer
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 22, 2009 @ 09:00
    Jeroen Breuer
    0

    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

     

    .Controls.Add(new System.Web.UI.UserControl().LoadControl(_usercontrolPath));

    This way the custom datatype works the same as the usercontrol wrapper, but with a prevalue editor.

Please Sign in or register to post replies

Write your reply to:

Draft