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 1347 posts 1608 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 4537 posts 6006 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 1347 posts 1608 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)?

     

  • 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