Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Aug 24, 2011 @ 18:02
    Gordon Saxby
    0

    Detect Textstring or TextboxMultiple

    I am writing a UserControl to dynamically create an Edit / Update form based on the properties of a Document Type.

    I am using the following code:

    var dataEditor = propertyType.DataTypeDefinition.DataType.DataEditor;
    var fullTypeName = dataEditor.GetType().ToString();

    but fullTypeName equals "umbraco.editorControls.textfield.TextFieldEditor" for both Textstring and TextboxMultiple properties!?

    Is there a way to detect which type it is, so that I can create a multi-line text box if necessary?


  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 24, 2011 @ 18:04
    Dirk De Grave
    0

    Check the Id which should be a guid

     

    Cheers,

    /Dirk

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 24, 2011 @ 18:44
    Gordon Saxby
    0

    Not having much luck with that ... which GUID should I be checking and what should I check it against (I assume it's the GUID reported on the Data Types page in Umbraco)?

     

Please Sign in or register to post replies

Write your reply to:

Draft