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";

原文地址:https://www.cnblogs.com/chucklu/p/3806173.html