با سلام وقت بخیر
دوستان
من در برنامه ام یک گریدویو ایجاد کردم که با یک تابع درون یک تایمر اطلاعات رو از پایگاه داده ریفرش میکنه
و یک تابع درون یک تایمر دیگر سطر اول رو میگیره درون یک ارایه و در سطر اخر اضافه میکنه و سطر اول رو حذف میکنه که یک چرخش مثل برد اعلامیه بوجود میاد
ولی برای بار اول اجرا که یک سطر خالی در اخر گریدویو وجود داره این فرایند انجام میشه اما بار دوم دیگه سطر اول به انتها اضافه نمیشه
int s = dataGridView1.Rows.Count;
s -= 1;
string flycode = dataGridView1[0, 0].Value.ToString();
string origin = dataGridView1[1, 0].Value.ToString();
string destination = dataGridView1[2, 0].Value.ToString();
string airco = dataGridView1[3, 0].Value.ToString();
string time = dataGridView1[4, 0].Value.ToString();
string date = dataGridView1[5, 0].Value.ToString();
string[] row1 = new string[] { flycode, origin, destination, airco, time, date };
for (int i = 0; i < dataGridView1.Columns.Count; i++)
{
this.dataGridView1[i, s].Value = row1[i];
}
dataGridView1.Rows.Remove(dataGridView1.Rows[0]);
}
اینم گریدویو
s1.jpg
- - , .
برچسب:
نویسنده: محمد رضا جوادیان