Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting List of Formatted Names
Message
De
23/12/2010 20:23:20
 
 
À
23/12/2010 17:29:09
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01493720
Message ID:
01493762
Vues:
44
>Pretty simple really just add a property to your Entity that looks something like this. Since it accesses the other properties they will be hooked up to the data row. Now bind your drop down to this property rather than the others.
>
>Merry Christmas to you also.
>
>public string FullName
>{
>	get { return this.LastName + ", " + this.FirstName + " " + this.MiddleName; }			
>}
>
:( Afraid there must be something more to it than that. I did as you said and I get this error:

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'FullNameLFM'.

This is my code which I put in the AgentEntity.cs:
        public string FullNameLFM
        {
            get { return this.LastName + ", " + this.FirstName + " " + this.MiddleName; }
        }
This is the dropdownlist definition:
            <mm:mmDropDownList ID="cboAgent" runat="server" BindingSource="Agent" BindingSourceDisplayMember="FullNameLFM"
                AutoPostBack="true" BindingSourceValueMember="AgentPK" BindingValueSource=""
                BindingValueSourceMember="">
            </mm:mmDropDownList>
Is there something else for me to do or did I put this in the wrong place?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform