Copied to clipboard

Flag this post as spam?

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


  • andrew shearer 510 posts 659 karma points
    Sep 01, 2010 @ 02:54
    andrew shearer
    0

    dynamic datatype controls

    hi, i have a custom datatype which adds controls to a content page as follows:

                    DataTypeDefinition type = DataTypeDefinition.GetDataTypeDefinition(-88); //-88 is a TextBox
                    definitionListItem.Controls.Add(type.DataType.DataEditor.Editor);

     

    but now to i get the value entered into this text box on a button click event handler?

     

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 01, 2010 @ 10:07
    Ismail Mayat
    0

    andrew,

    Take a look at the source code of membercontrols or doc2form see http://umbracoext.codeplex.com/SourceControl/changeset/view/52448 they will give you better idea of how to do this.

    Regards

    Ismail

  • andrew shearer 510 posts 659 karma points
    Sep 01, 2010 @ 23:10
    andrew shearer
    0

    thanks a lot!

    i managed to work it out yesterday but that source code reaffirms my findings.

    turns out you need to "Save" the DataEditor to populate the Data object of the DataType..

    Umbraco can be a very obscure model!

     

Please Sign in or register to post replies

Write your reply to:

Draft