Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 629 posts 1016 karma points
    Jul 29, 2010 @ 17:31
    Dan Evans
    0

    How to access values programatically

    I'm using this datatype for custom member properties which works fine. I am trying to apply it to this profile editor macro - http://umbracoprofileeditor.codeplex.com/

    I am having trouble getting the selected bvalue of the member property selected in the drop down list using this code:

    var dataEditorControl = property.PropertyType.DataTypeDefinition.DataType.DataEditor.Editor;
    dataEditorControl.ID = string.Format("editor{0}", property.PropertyType.Name);

    var controlType = dataEditorControl.GetType().ToString();
    switch (controlType)
    {
    case "Mindbus.DropDownDataEditor":
    {

    ((DropDownList)((Mindbus.DropDownDataEditor)dataEditorControl).Editor.Controls[0]).SelectedValue = (string)property.Value;
    }
    break;

     

    Can you advise how to access the selected value from

    Mindbus.DropDownDataEditor

    Thanks

    Dan

     

Please Sign in or register to post replies

Write your reply to:

Draft