How to call input values from datagridview? (unlimited row)

Jun 12 2017 9:13 PM
1.PLease help me, How to call input values from datagridview.(unlimited rows) I tried this coding, but it's not working, didn't show any answers.
  1. private void dataGridView10_CellContentClick(object sender, DataGridViewCellEventArgs e)  
  2.        {  
  3.            for (int i = 0; i < (dataGridView10.Rows.Count); i++)  
  4.            {  
  5.                DataGridViewRow row = dataGridView1.Rows[i];  
  6.                groundproperty[0] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column1"].Value);  
  7.                groundproperty[1] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column2"].Value);  
  8.                groundproperty[2] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column3"].Value);  
  9.                groundproperty[3] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column4"].Value);  
  10.                groundproperty[4] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column5"].Value);  
  11.                groundproperty[5] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column6"].Value);  
  12.                groundproperty[6] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column7"].Value);  
  13.                groundproperty[7] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column8"].Value);  
  14.                groundproperty[8] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column9"].Value);  
  15.            }  
  16.        }  
2.  Second quistion in groupbox of 'OUTPUT VALUE' didn't changing, just showing one row, how can i do ? i need, if user insert unlimited case of input than calculating that number of case's ouptut showing on "output value' datagridview.
I tryied this code, but showing just one row result.
  1. for (int n= 0; n< (dataGridView1.Rows.Count); n++)  
  2.            {  
  3.                DataGridViewRow row = dataGridView1.Rows[n];  
  4.               dataGridView1.Rows[n].Cells["dataGridViewTextBoxColumn2"].Value = finalvalue[0].ToString();  
  5.               dataGridView1.Rows[n].Cells["dataGridViewTextBoxColumn3"].Value = finalvalue[1].ToString();  
  6.                  
  7.            }