Fill a datagridview from a list and edit the list (add)

I have a list

List <string> aList = new List<string>(); aList.Add("A,B"); aList.Add("A,C"); aList.Add("A,D"); aList.Add("A,E"); 

I have a datagridview and I want to display this list in this datagridview.

 aDataGridView.DataSouce = aList; // Dosent seems to work. 

When this is displayed in the datagridview, I want the user to add it from the gridview. For instance:

DataGridView:
(This column is added by the user), and if the user does not add anyhing, this row is excluded from the aList.
B apple
Bananas C

AD
Ae

In any case, I can achieve this. Sorry, I'm new to C #. Many thanks

+4
source share
1 answer

I would suggest using data that can be ready to be used as a datagridview.datasource data source.

+2
source

All Articles