The mysteries of software development and networking... RSS 2.0



 Friday, March 10, 2006

I'm working on a WinForm 2.0 window on which I have a DataGridView.

The DataGridView is connected to an ObjectDataSource and the datasource of this ObjectDataSource is pointing to an array of items.

This works nicely, however, the user can use a popup to add an entry to the array. The DataGridView will not automatically detect that the underlying array has changed.

Solution: Call BindingSource.ResetBindings(..) after updating the array. This will raise an event which makes the DataGridView redraw itself.

Friday, March 10, 2006 10:01:38 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
Comments are closed.
About
This blog is run by Mark Blomsma.
© Copyright 2008
Develop-One
Sign In
Statistics
Total Posts: 334
This Year: 78
This Month: 2
This Week: 0
Comments: 94
All Content © 2008, Develop-One
DasBlog theme 'Business' created by Christoph De Baene (delarou)