Get a list of objects from a DataGridView?

I bind a list of objects to a DataGridView as follows

 var list = new List<Value>(); list.Add(new Value() { Name = "test" }); list.Add(new Value() { Name = "second" }); dataGrid.DataSource = list; 

After pasting, editing, deleting ... how can I get a List<Value> from a DataGridView ?

+4
source share
2 answers

gridview modifies an existing list.

list will display the current contents of the gridview.

+4
source

Source: https://habr.com/ru/post/1347018/


All Articles