Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataBinding revisited
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00716215
Message ID:
00716253
Views:
13
Cathi,

OK, maybe I didn't fully explain the situation. I have a ListView object that I'm basically using for navigating the rows in the DataTable. I have several textboxes, comboboxes and a checkbox on the form to be used for editing the columns in the row. In the SelectedIndexChanged EventHandler of the ListView, I change the BindingContext.Position to the appropriate row. At this time, there have been *no* changes to the underlying data ... I'm just changing row positions. This should *not* change my data, and yet it does (for the checkbox column). If I bind to the checkbox's Checked property, I do not have this issue (all works well), but why I did this in the first place (sub-classing the checkbox to change how the databinding is handled) was because it doesn't work when a checkbox's bound column is DBNull.

~~Bonnie



>Bonnie,
>
>The Position property must call every get that is used for databinding when the position is changed. This makes some sense though since it wants to update the DataRow before the row is changed and new values are fetched. Is this breaking your code? Doesn't this.m_BindThis have the correct value to replace the DataRow with?
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform