ameysams
شنبه 31 شهریور 1386, 10:38 صبح
با سلام در یک datagridview چگونه میتوان در یک سلول جمع این سلول با سلول بالایی
خودش را بدست آورد؟ با تشکر
MH2538
شنبه 31 شهریور 1386, 13:43 عصر
سلام
نمونه کد:
dataGridView1.Rows[2].Cells[5].Value = Convert.ToInt32(dataGridView1.Rows[2].Cells[5].Value) + Convert.ToInt32(dataGridView1.Rows[1].Cells[5].Value);
یا
dataGridView1.CurrentRow.Cells[5].Value = Convert.ToInt32(dataGridView1.CurrentRow.Cells[5].Value) + Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index - 1].Cells[5].Value);
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.