抄了个,你也来抄抄~~// create array big enough for all the rows and columns in the grid
string[,] LogArray = new string[dataGridView1.Rows.Count, dataGridView1.Columns.Count]; int i = 0;
int x = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
while (x < dataGridView1.Columns.Count)
{
LogArray[i, x] = row.Cells[x].Value != null ? row.Cells[x].Value.ToString() : string.Empty;
x++;
} x = 0;
i++; //next row
}
string[,] LogArray = new string[dataGridView1.Rows.Count, dataGridView1.Columns.Count]; int i = 0;
int x = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
while (x < dataGridView1.Columns.Count)
{
LogArray[i, x] = row.Cells[x].Value != null ? row.Cells[x].Value.ToString() : string.Empty;
x++;
} x = 0;
i++; //next row
}
{
for (int j = 3; j < 9; j++)
{
string k =this. dgv.Rows[i].Cells[j].Value.ToString () ; array[i-1, j-3] = Convert.ToDouble(k);
}
}
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
string[,] LogArray = new string[dataGridView1.Rows.Count, dataGridView1.Columns.Count];
int i = 0;
int x = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
while (x < dataGridView1.Columns.Count)
{
LogArray[i, x] = row.Cells[x].Value != null ? row.Cells[x].Value.ToString() : string.Empty;
x++;
}
x = 0;
i++; //next row
}\
在这个基础上怎么求这个数组的每一列的最大值和最小值