Copied to clipboard

Flag this post as spam?

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


  • Accusoft 58 posts 109 karma points
    Apr 28, 2011 @ 14:58
    Accusoft
    0

    Umbraco Custom Data Type with Multiple Values

    I've been working on a new custom data type based on Tim's blog. I've got it 95% complete, but am running into a problem saving.  Tim's example only had a text field, in my case it's a series of checkboxes; essentially an array of data.  I would rather not store this in one field but multiple fields with a relationship.  His "OnSave" example looks like this:

    void DataEditorControl_OnSave(EventArgs e)
    {
    base.Data.Value = m_control.Text;
    }

    Any ideas how I can convert this to take an array of data and save across multiple fields with a relationship?

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Apr 28, 2011 @ 23:32
    Sebastiaan Janssen
    0

    Currently, all of the datatypes solve this by creating either a comma-separated list of data or creating an XML structure within the field. It is unfortunately not possible to store the data of a single datatype over multiple columns in the database.

  • Accusoft 58 posts 109 karma points
    Apr 29, 2011 @ 13:50
    Accusoft
    0

    Not the answer I was hoping for but it is what it is.  Any chance this can be improved upon in future versions of Umbraco?  Thanks!

  • aghy 129 posts 308 karma points
    Apr 29, 2011 @ 15:19
    aghy
    0

    If you have a look at the cmsDataTypePreValue table it has an alias field and it looks like the new google maps package uses it. So it's probably worth having a look into that.

    Ben

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies