Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataBinding revisited
Message
From
28/10/2002 16:59:48
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
DataBinding revisited
Miscellaneous
Thread ID:
00716215
Message ID:
00716215
Views:
42
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
Next
Reply
Map
View

Click here to load this message in the networking platform