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.

private void dataGridView10_CellContentClick(object sender, DataGridViewCellEventArgs e)
            for (int i = 0; i < (dataGridView10.Rows.Count); i++)
                DataGridViewRow row = dataGridView1.Rows[i];
                groundproperty[0] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column1"].Value);
                groundproperty[1] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column2"].Value);
                groundproperty[2] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column3"].Value);
                groundproperty[3] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column4"].Value);
                groundproperty[4] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column5"].Value);
                groundproperty[5] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column6"].Value);
                groundproperty[6] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column7"].Value);
                groundproperty[7] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column8"].Value);
                groundproperty[8] = Convert.ToDouble(dataGridView10.Rows[i].Cells["Column9"].Value);
  1. 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.

    for (int n= 0; n< (dataGridView1.Rows.Count); n++)
    DataGridViewRow row = dataGridView1.Rows[n];
    dataGridView1.Rows[n].Cells["dataGridViewTextBoxColumn2"].Value = finalvalue[0].ToString();
    dataGridView1.Rows[n].Cells["dataGridViewTextBoxColumn3"].Value = finalvalue[1].ToString();


Edited by Khaliunaa

Attachments 1.png 62.37 KB
1 Year
Discussion Span
Last Post by ddanbe
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.