Handling Windows Forms Data Binding Errors
page 2 of 6
by Jon Kruger
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33441/ 96

What can go wrong?

There are a few different things that can go wrong when you use data binding.

·         Exception when setting the value

·         Value assigned to the property fails validation (but does not throw an exception)

·         Exception thrown when data binding cannot call the setter

·         Exception thrown by someone handling a CurrencyManager event


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
Comment:
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-2021 ASPAlliance.com  |  Page Processed at 2021-10-20 11:49:01 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search