in c# Pass selected row one gridview to another gridview on another form : private void btnpass_Click(object sender, EventArgs e)
      {
          Inventory coo = new Inventory(dataGridView1.SelectedRows[0].Cells[0].Value.ToString(),
          dataGridView1.SelectedRows[0].Cells[1].Value.ToString(),
          dataGridView1.SelectedRows[0].Cells[2].Value.ToString(),
          dataGridView1.SelectedRows[0].Cells[3].Value.ToString(),
          dataGridView1.SelectedRows[0].Cells[4].Value.ToString(),
          dataGridView1.SelectedRows[0].Cells[5].Value.ToString(),
           dataGridView1.SelectedRows[0].Cells[6].Value.ToString());
          coo.Show();
      }
 


Itried Pass selected row gridview to another gridview on another form but show error.
error is (Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index)
i use different method but not my problem solve