dotnet windows forms databinding:
Hello
Please help me...
I have created an object and implemented the IBindingList.
The object is as follows:
1 project has many Sections
1 section has many items,
1 item has many lines.
I have bound this object to four datagridviews to display the master-detail
reationships. (Thanks to a previous postee)
1 datagridview to display the project detials
1 datagridview to display the section details
1 datagridview to dsiplay the item details
1 datagridview to display the line details
My problem is this:
I have created events for each property within each object. One of the
properties values in each 'line' is dependent on three other properties in
that same line. I have raised events as these three properties are changed to
notify thr datagridview that the other property has also changed. But my
datagridview is not updating until I click on that property.
I have tried setting the Defaultdatasource update mode as follows on form
load:
dgvLines.DataBindings.DefaultDataSourceUpdateMode =
DataSourceUpdateMode.OnPropertyChanged
This didnt work either?
Any guesses as to what I am doing wrong. I have labelled all my events by
the property name and the "Changed" word after them.
In my line class I am implementing
Implements IEditableObject
Implements IDataErrorInfo
In my lines class I am implementing
Inherits CollectionBase
Implements IBindingList
I am doing every thing dynamically. Even creating the datagrid columns. I
did try using the designer to create the columns, but still didnt work.
I have dived head first into databinding and am drowning, please help me.
Thanks in advance for any suggestions or advice.
Ollie