Populating Dropdowns in the User Interface with Text Values, not IDs????

Sep 19, 2012 at 12:10 PM


How does one ensure that any navigation(foreign keys) properties are presented as dropdowns in the UI with the Text value representing the "Name" field in the Look Up Object/Table rather than the current ID?

Many thanks,


Sep 19, 2012 at 1:18 PM

What should be presented in the drop-downs is the 'title' of the objects.  If that type of object does not have a title, then it will just use the ToString() for the object  -  which may be what you are seeing.

Just annotate that Name property on the associated type with [Title].

Sep 19, 2012 at 1:46 PM
Edited Sep 19, 2012 at 2:23 PM


Thanks, I am getting there, but not quite there. I believe I also need to use the [Bounded] attribute on the class to get the drop down.

The screen thus far is:


The first bit of the Customer Class is:



    public partial class Customer
        #region Primitive Properties
        #region Id (Int32)
        public virtual int  Id {get; set;}

        #region Name (String)
        public virtual string  Name {get; set;}



I just need to remove the CustomerID (auto populate from DropDown) and the ID(Autopopulate on Save to the DB via the Identity DB feature).

Thanks for any help, really appreciated.

Sep 19, 2012 at 2:54 PM

Now discovering the [disabled] and [hidden] attributes !!! :)

Many thanks.