vb.net get column name from datagridview code example
Example: c# get all the column names from datagridview
for (var i = 0; i < DataGridView.ColumnCount; i++)
var name = DataGridView.Columns[i].HeaderText;
for (var i = 0; i < DataGridView.ColumnCount; i++)
var name = DataGridView.Columns[i].HeaderText;