Handling Windows Forms Data Binding Errors
page 1 of 6
Published: 01 Aug 2007
This article shows you how to make sure you find out about any errors and problems that might occur during data binding.
by Jon Kruger
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30297/ 45


Data binding is great, but one thing that newbies do not know is that data binding will eat exceptions and never tell you - unless you know what events to listen to.

Back in the .NET 1.1 days, this was really bad because there was no way to find out that these exceptions were happening. So you would sit there for hours wondering why things were not working when everything looked fine.

View Entire Article

User Comments

Title: Easy open source alternative to data binding   
Name: Michael L Perry
Date: 2008-04-09 10:29:50 PM
Data binding can be complicated and error prone. Thanks for posting this quick guidance on making it simpler.

There is, however, and easier way. Please check out this open source alternative to data binding at http://codeplex.com/updatecontrols. Update Controls are Windows Forms controls that update themselves when your data changes. You don't have to bind the controls through a binding source. They can work with any business logic you want to use.

To use Update Controls, you don't bind to a property. Instead, you handle an event. For example, the UpdateTextBox control fires the GetText event to determine what string to display. You can call any business logic to figure out this string. The control pays attention to all of the data that you access during that event. When that data changes, the event is fired again. It's all automatic, and works with any business logic, no matter how complex or indirect.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-06-23 9:29:55 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search