/// <summary> /// 双击数据显示控件以便捷的方式查看数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } FormViewData form = new FormViewData(dataGridView1.Columns, dataGridView1.Rows[e.RowIndex]); form.ShowDialog(); }