using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace Common { /// <summary> /// DataGridView控件操作 /// </summary> public class CtlDataGridViewOperate { private DataGridView m…
SqlConnection conn = new SqlConnection('Server=(local);DataBase=test;User=sa;Pwd=sa'); SqlDataAdapter da = new SqlDataAdapter('select * from test', conn); DataSet ds = new DataSet(); da.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; ① DataGridVie…