I’ve a DataGridView that looks like so:
DGV
| Col 1 | Col 2 | Col 3 |
I was wondering if it is possible to remove the first column when I’m writing to a datatable so that it’ll look something like this:
DataTable
| Col 2 | Col 3 |
Additionally, is it possible to eliminate rows that contain a certain value? So if the value is in the datagridview, I want to remove it from my datatable.
E.g.
DGV
| Col 1 | Col 2 | Col 3 |
| Value | One | Two |
| Value | Three | Two |
| Value | Four | Two |
So if there’s the value “Three” in the DataGridView, the DataTable would be
DataTable
| Col 2 | Col 3 |
| One | Two |
| Four | Two |
Any help would be much appreciated! I’ve already tried parsing row by row, but I’m wondering if there’s a more efficient way to achieve this.
Simply, you can do like this to meet your above condition: