Home > Net >  C # does not use the bound data source, is there a way to write the CSV file into the DGV
C # does not use the bound data source, is there a way to write the CSV file into the DGV

Time:02-27

After the CSV file import DGV, since the code is to use the dataGridView2. The DataSource=CSV. OpenCSVToDataTable (CSVPath);
I want to pass the DataGridViewRow again after a row=new DataGridViewRow; Int index=dataGridView2. Rows. The Add (row); The code
To add data, complains, "System. InvalidOperationException:" unable to set on data binding DataGridView control ColumnCount properties, "
So I wonder is there any way can be directly to the CSV file directly into DGV?
"
  •  Tags:  
  • C#
  • Related