Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding textbox, grid column etc to derived property
Message
De
08/05/2007 06:35:09
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Binding textbox, grid column etc to derived property
Divers
Thread ID:
01223307
Message ID:
01223307
Vues:
65
This seems like it ought to work but doesn't. MM.NET 2.4, strongly typed entitiy everywhere. Any ideas?
public class OrderLineEntity: ABusinessEntity
{
  public double? Price{ get {...} set {...} }
  public double? Quantity { get {...} set {..} }

  public double? Total { get { return Price*Quantity;} }
}

// .. then on form...
           this.mmTextBox4.BindingSource = "OrderLine";
            this.mmTextBox4.BindingSourceMember = "Total";
Bound Textboxes crash in mmBindingStrategy.cs trying to access ds.Tables[tableName].Columns[fieldName]. Bound label crashes with mysterious "Cannot bind to the property or column .... on the DataSource.
Parameter name: dataMember"
Grid columns show blank (probably internally one of the above exceptions is being silently caught: I haven't investigated this one because it seemed least likely to work in the first place).
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform