Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Binding with DataSets
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00685491
Message ID:
00685539
Views:
13
Bill,

We had found some problems with data binding via the property sheet (I don't recall right now what they are) and so, like JVP, we also have our own DataBind() method in all of our base objects. Is this the "right" way to do this? Dunno ... but it seems to work for us just fine.

~~Bonnie


>Has anyone found a way to 'persist' data bindings?
>
>We are using strongly typed datasets to pass data across our tiers. One advantage is the ability to drop the dataset on a Windows form and bind the controls to it.
>
>The forms invariably have some sort of 'Refresh' procedure. Whenever the data is refreshed, the instance of our dataset is replaced with a new one. This 'blows' all the bindings and the controls have to be rebound.
>
>Currently we have a BindControls method in our base form and put all of the binding code into this method. The problem is that it means either writing all the binding code calls by hand in this method (not using the visual designer), or selectively copying binding code from the generated code into this method and adding .Clear calls, etc. Messy, messy.
>
>Another option we are considering is to persist the instance of the original dataset and use another instance to bring in the data, then copy it into our original. But this means carrying the overhead of 2 complete copies of the data in memory.
>
>Ideas?
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform