private void UpdateSelectedDevices()
{
if (SrWizardType.SrToReattach == null)
{
//when creating a new SR the checkbox column is visible
_selectedDevices = (from DataGridViewRow row in dataGridView.Rows
let deviceRow = row as FCDeviceRow
where deviceRow != null
&& deviceRow.Cells.Count > 0
&& (bool)(deviceRow.Cells[colCheck.Index].Value)
select deviceRow.Device).ToList();
}
else
{
//when reattaching SR the checkbox column is hidden
_selectedDevices = (from DataGridViewRow row in dataGridView.Rows
let deviceRow = row as FCDeviceRow
where deviceRow != null && deviceRow.Selected
select deviceRow.Device).ToList();
}
}