merfi1
سه شنبه 10 بهمن 1391, 13:58 عصر
من از ازدیتا گرید اولی بازدن تیک چک باکسها اونا رو تو دیتا گرید دومی اضافه میکنم اما ردیف اخری روکه تیک میزنم اضافه نمیشه مشکل کجاس اینم کد مورد استفاده: for (int i = 0; i < dataGridView1.RowCount - 1; i++)
{
if (Convert.ToBoolean(dataGridView1.Rows[i].Cells[4].Value) == true)
{
object[] ob = new object[] { dataGridView1.Rows[i].Cells[0].Value, dataGridView1.Rows[i].Cells[1].Value, dataGridView1.Rows[i].Cells[2].Value, dataGridView1.Rows[i].Cells[3].Value };
dataGridView2.Rows.Add(ob);
}
{
if (Convert.ToBoolean(dataGridView1.Rows[i].Cells[4].Value) == true)
{
object[] ob = new object[] { dataGridView1.Rows[i].Cells[0].Value, dataGridView1.Rows[i].Cells[1].Value, dataGridView1.Rows[i].Cells[2].Value, dataGridView1.Rows[i].Cells[3].Value };
dataGridView2.Rows.Add(ob);
}