Thanks, guys. The first case works perfectly, the W connected and the S connected retrieve the error:
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
var id = dataGridView1.CurrentRow.Cells["Id"].Value;
var BBB = dataGridView1.CurrentRow.Cells["Connected"].Value;
string idd = id.ToString();
string BBB2 = BBB.ToString();
textBox1.Text = id.ToString();
switch (BBB2)
{
case "Standalone":
ListStandalone dd = new ListStandalone(textBox1.Text);
dd.textBox2.Text = id.ToString();
dd.ShowDialog();
break;
case "W Connected":
ListW da2 = new ListW(textBox1.Text);
da2.textBox2.Text = id.ToString();
da2.ShowDialog();
break;
case "S Connected":
ListS dd6 = new ListS(textBox1.Text);
dd6.textBox2.Text = id.ToString();
dd6.ShowDialog();
break;
case "Retail":
PrintRetail dd4 = new PrintRetail(textBox1.Text);
dd4.Show();
break;
}