Copied to clipboard

Flag this post as spam?

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


  • Nick 101 posts 122 karma points
    Jul 04, 2013 @ 11:12
    Nick
    0

    Custom Data Type for multi-select drop down - how to extend user control wrapper?

    I have created a new Data Type because I wanted a multi-select drop down that populates itself from either a CSV list or the database with specific value/text options, so I extended IUsercontrolDataEditor and created it.

    The control itself works fabulously. 
    The problem I have is that, because it extends IUsercontrolDataEditor, we create it in umbraco using "User control wrapper" which doesn't give us any additional parameters.

    Is there a way to extend the "user control wrapper" data type to accept custom properties?
    Couldn't find a way. 
    Thank you

  • Comment author was deleted

    Jul 04, 2013 @ 11:43

    Yeah please check data editor settings 

    Basicly it's adding properties and marking them with the attribute

    http://www.nibble.be/?p=97

  • Comment author was deleted

    Jul 04, 2013 @ 11:44

    Different types available out of the box (defaults to a simple textbox) also possible to create custom types http://www.nibble.be/?p=96

  • Comment author was deleted

    Jul 04, 2013 @ 11:46

    And for more details on how to create custom datatypes as easy as possible I woudl recommend watching http://www.nibble.be/?p=101

  • Nick 101 posts 122 karma points
    Jul 04, 2013 @ 12:06
    Nick
    0

    Perfect!!

    Thank you!!! 

  • Nick 101 posts 122 karma points
    Jul 04, 2013 @ 12:24
    Nick
    0

    Incidentally, is there a FilePicker setting type (of tpye IDataEditorSettingType)?
    Sure there should be but can't find it

  • Comment author was deleted

    Jul 04, 2013 @ 12:27

    Those are all the default ones http://umbraco.com/media/182981/WindowsLiveWriter_NewinJUNODataEditorSettings_10645_image_8.png

    No upload but there is a Path picker

    All default types can be found in the umbraco.editorControls.SettingControls namespace (need reference to umbraco.editorControls.dll)

  • Comment author was deleted

    Jul 04, 2013 @ 12:28

    And media picker is also available so if you store file in media library...

  • Comment author was deleted

    Jul 04, 2013 @ 12:30

    And should be pretty easy to create an upload one if you use this as an example http://www.nibble.be/?p=96

  • Nick 101 posts 122 karma points
    Jul 04, 2013 @ 13:45
    Nick
    0

    Worked well!

    It's funny how these pages don't show up when I google for stuff.

    Thanks again! 

  • Comment author was deleted

    Jul 04, 2013 @ 13:57

    Sweet glad I could help :)

  • BenH 59 posts 199 karma points
    Oct 24, 2013 @ 19:30
    BenH
    0

    Highjacking your thread, but how can i find where a usercontrol wrapper is populating a dropdown list that is a document type property?  We have a language selection list and the values of the options are incorrect and when saved cause the home nodes to break due to an incorrect language identifier. 

    Trying to reverse enginner this situation so I can fix. 

    Thanks! 

Please Sign in or register to post replies

Write your reply to:

Draft