datagridview控件的使用

http://home.cnblogs.com/group/topic/40730.html

 

 

datagridview定位到最后一行的方法

this.dataGridView2.CurrentCell = this.dataGridView2.Rows[this.dataGridView2.Rows.Count - 1].Cells[0];
this.dataGridView2.FirstDisplayedCell = this.dataGridView2.CurrentCell;

 

 

设置显示时间以及保留相应的小数位数

dataGridView.Columns["时间"].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm:ss";
dataGridView.Columns["数据"].DefaultCellStyle.Format = "#.000";

posted @ 2014-06-24 15:24  ChuckLu  阅读(299)  评论(0编辑  收藏  举报