datagridview显示表格,怎么让它显示完一行之后,间隔0.5秒后在显示下一行?

解决方案 »

  1.   

    循环里加上
    Thread.Sleep(500);
    Application.DoEvents();
      

  2.   

    把datagrid的数据逐行添加而不是直接绑定表,每添加一行后执行Thread.Sleep(500);
      

  3.   

    循环添加行,循环里边添加上Thread.Sleep(500);如果在主线程上,会有卡顿
      

  4.   

    说过了,就是添加行数据;DataTable aa = new DataTable(); aa.Rows.Add(new object[] { 1, 2, 3, 4, 5 }); 
    DataGridView bb = new DataGridView(); bb.Rows.Add(new object[] { 1, 2, 3, 4, 5 });
      

  5.   

                System.Timers.Timer 定时 = new System.Timers.Timer(1000); 定时.AutoReset = true; 定时.Enabled = true;
                定时.Elapsed += new System.Timers.ElapsedEventHandler(定时触发);        private void 定时触发(object sender, System.Timers.ElapsedEventArgs e)
            {
                DataTable aa = new DataTable(); aa.Rows.Add(new object[] { 1, 2, 3, 4, 5 });
                DataGridView bb = new DataGridView(); bb.Rows.Add(new object[] { 1, 2, 3, 4, 5 });
            }