How to get these edited/updated rows of a DataGridView which is bound to List<T> instead of a DataTable?
Also the last new row (the one with a “*”) is gone if a DataGridView is bound to DataTable?
Does it have to use DataTable when building a editable DataGridView?
The quick solution is to use a
BindingList<T>instead of aList<T>.That will allow you to add rows to your collection.
Longer term you will want to consider extending the
BindingList, since the out of the boxBindingListdoes not support sorting and other nice things.