DataGridView with an object data source

Posted by myself on September 04, 2010
For my Batch Replacer I am using a DataGridView with an object data source, meaning that I have a collection class that holds the data to be displayed. At first that class inherited from a usual List<T>, which led to the problem that the data binding wasn't two-way. As soon as I bound data to the DataGridView, it wasn't possible to add any new rows to it in my user interface. After some research I found out that instead of using a normal List<T> I was supposed to use a BindingList<T>. Using that the binding is two-way, and the user interface is normally editable and new rows can be added. Also, of course, all modifications done in the user interface are reflected in the object (meaning e.g. that when a new row is added, the object data source contains a corresponding entry).
  • 0 comments

  • Fatal error: Cannot redeclare getpagecooserlinkhtml() (previously declared in /home/www/web261/html/koffeinfrei5/modules/Blogs/action.showblog.php:11) in /home/www/web261/html/koffeinfrei5/modules/Blogs/action.showblog.php on line 11