santhosh_cz

hi

how we can get collection of all cells in a particular datagridviewcheckbox column

It seems there is no function exists like that.

So how can we get the collection of all cells

Thanks,

Santhosh.



Re: Windows Forms General Regarding collection of cells in a single column

nobugz

You'll have to go through the Row property to access the cells. You can easily cook your own though. Try this:

private static List<DataGridViewCell> GetGridColumnCells(DataGridView dgv, int column) {
List<DataGridViewCell> cells = new List<DataGridViewCell>();
foreach (DataGridViewRow row in dgv.Rows)
cells.Add(row.Cells[column]);
return cells;
}