Hope someone out there can help me. This is my scenario: I've got a Grid with a BindingSource as its datasource. The BindingSource's datasource is a list of business objects. This works great, I can set my visible columns, change captions etc. But when I make a change the the underlying business object all of my changes in the grid are lost. Is there any way to prevent the grid from changing when the business object is changed?
I know I can save and reload the grid layout with the layout wizard, but with the number of grids I'm working on keeping an up-to-date copy of the layout to reload is more of a hassel then resetting the required column properties manually.
Thanks
Hi,
maybe this will help:
bs.SuspendBinding();
// make changes to the business object here
bs.ResumeBinding();
Or add a value called _isInternalManipulation
private bool _isInternalManipulation = false;
and call the NotifyPropertyChange method in the set accessor only if _isInternalManipulation is true. When you want to manipulate a property of the business value internal, set _isInternalManupulation = true first and change the property after. At the end set the _isInternalManipulation to false.
Hope this will help.
Kind regards
Ralf