Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataBinding revisited
Message
De
28/10/2002 16:59:48
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
DataBinding revisited
Divers
Thread ID:
00716215
Message ID:
00716215
Vues:
43
Has anyone tried data-binding to a property that you've defined? I have the following (this is for a checkbox):
protected bool m_BindThis;

this.DataBindings.Add("BindThis", MyDataTable, "MyColumn");

[Bindable(true)]
public bool BindThis
{
  get {return this.m_BindThis;}
  set
  {
    this.m_BindThis = value;
    this.Checked = this.m_BindThis;
  }
}
There's other things that need to be defined in this check-box subclass (like an Event Handler or two), but my problem isn't there. My problem is that as soon as the BindingContext.Position changes to a different row of the bound table, the value of the bound column gets changed (presumably by the get of the BindThis property). This obviously shouldn't happen, but I'm stumped as to what I might be missing.

Anyone have any suggestions???

TIA,
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform