Hi im just brand new here and already im highly impressed with the site.
Just a simple question (hopefully), i am trying to do something exactly the same as shown here http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_23263374.html?sfQueryTermInfo=1+c+datagridview+export
But my DataGridView is made up of all text. So how would i modify this function to work accordingly?
And then how would i call it? ExportGridData(List<string
I have included the code snipits used to populate the datagridview if that heklps explain what i am trying to do.
Basically i want to export the data once modified to comma separated file.
private void ImportCSV()
List<string> testParse =
DataTable newTable = new DataTable();
foreach (string column in testParse)
foreach (string row in testParse)
DataGrid.DataSource = newTable;
public List<string> parseCSV(string path)
List<string> parsedData = new List<string>();
using (StreamReader readFile = new StreamReader(path))
while ((line = readFile.ReadLine()) != null)
row = line.Split(',');