SQLiteCommand cmd=conn.CreateCommand();
cmd.CommandText = "select * from T_BookInfo";
sda = new SQLiteDataAdapter(cmd);
ds = new DataSet();
sda.Fill(ds);
dgvx_bookinfo.DataSource = ds.Tables[0];
dgvx_bookinfo.Update();

解决方案 »

  1.   

    用设计器添加好
    然后打开form.desinger.cs文件,看给你生成的代码,照着写即可。
      

  2.   


    dataGridView1是这样加一行,supergridcontrol没用过,应该相似吧
     //添加行数据
                dataGridView1.Rows.Add(1);
                this.dataGridView1.Rows[0].Cells[0].Value = "一";
                dataGridView1["btnCon", 0].Value = "二"; //按钮name:btnCon