Add DataGridview,Button and ListBox in your form.
Create one method for getting Particular Cell data for listbox:
DisplayCellDataintoListBox(<Pass Datagridview CellId>);
Create one method for getting Particular Cell data for listbox:
void DisplayCellDataintoListBox(int cellId)
{ foreach (DataGridViewRow row in dataGridView1.Rows)
{ listBox1.Items.Add(Convert.ToString(row.Cells[cellId].Value));
}
}
Call this method in the Button Click event:{ foreach (DataGridViewRow row in dataGridView1.Rows)
{ listBox1.Items.Add(Convert.ToString(row.Cells[cellId].Value));
}
}
DisplayCellDataintoListBox(<Pass Datagridview CellId>);