views:

39

answers:

1

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 datagridview, and I want to display this list on this datagridview.

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

When this is displayed on the datagridview I want the user to add to it from the gridview.For example:

DataGridView:
(This column added by the user) and if user does not add anyhing, that row is excluded from aList.
A B apple
A C banana
A D
A E

Is there anyway I can achieve this. sorry I am a beginner in C#. Many Thanks

+3  A: 

I would suggest utilizing a datatable as it can ready be used as a datagridview.datasource.

Michael Eakins
cant use database :(
Ani
A datatable is not a database it is simply as structure that can be used with a database
Michael Eakins