Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Binding to a custom object
 

Binding to a custom object

HI,

this is possibly a dumb question, but it is a long time since i last did this and i can't remember how i did it. I have a data object, and i want to bind some UI elements to it, which is easily achieved using the DataBindings property on the UI elements. But when the data changes in the data object, how do i notify the UI elements that they should update themselves?

IIRC, last time i did this my data object derived from something within the framework, and i raised an event every time the data changed ina bindable property - but i may be mis-remembering. Can anyone point me in the right direction?

Thanks!

sluggy  Friday, November 30, 2007 12:23 PM
Your object should implement INotifyPropertyChanged


timvw  Friday, November 30, 2007 5:19 PM
Your object should implement INotifyPropertyChanged


timvw  Friday, November 30, 2007 5:19 PM
Excellent, thanks Tim!

sluggy  Saturday, December 01, 2007 1:45 AM

You can use google to search for other answers

Custom Search

More Threads

• One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding y
• datagridview
• Anonymous Types and the DataGridView
• insert values into DataBase problem
• Method to set datagridview row background color
• updating the datatable column
• Searchable DataGrid
• THEARD
• Why odesn't my server name show in Data Source Wizard?
• How to close mdi child form...