هذا الكود يجمع كل مافي الداتا جريد
انا اريد فقط يجمع فقط 10 صفوف
ولكم الشكر والتقدير
float tot = 0; for (int i = 0; i < dataGridView1.RowCount; i++ ) { tot += Convert.ToInt32(dataGridView1.Rows.Cells[0].Value); txtRowCount.Text = tot.ToString(); } if (tot == 0) { txtRowCount.Text = "0"; }