Question: I want to read data from one column of datagridview. My datagridview contains many columns but I want to read all cells but only from one column. I read all columns using this code:

```
foreach (DataGridViewColumn col in dataGridView1.Columns)
        col.Name.ToString();

```

But I want to read all cell from particular column.

Answer: 
Try this

```
string data = string.Empty;
int indexOfYourColumn = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
   data = row.Cells[indexOfYourColumn].Value;

```
**FOREACH LOOP**

```
string data = string.Empty;
string data = string.Empty;
int indexOfYourColumn = 0;
int indexOfYourColumn = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
foreach (DataGridViewRow row in dataGridView1.Rows)
   data = row.Cells[indexOfYourColumn].Value;

```

**FOR LOOP**

```
using System.Collections;

string data = string.Empty;
int indexOfYourColumn = 0;

IList list = dataGridView1.Rows;

for (int i = 0; i < list.Count; i++)
{
  DataGridViewRow row = (DataGridViewRow)list[i];
   data = row.Cells[indexOfYourColumn].Value;
  data = Convert.ToDecimal(row.Cells[indexOfYourColumn].Value);
}

```