关于,DataGridView帮定控件!请高手帮忙!
private void Form1_Load(object sender, EventArgs e){
string sqlstr = "select * from 操作员信息表";
string myconnstr = "server=192.168.1.102;uid=sa;password=whsd;password=whsd;database=jls_gz";
SqlConnection myconn = new SqlConnection(myconnstr);
DataSet mydataset = new DataSet();
SqlDataAdapter mydatasdapter = new SqlDataAdapter(sqlstr, myconn);
mydatasdapter.Fill(mydataset, "操作员信息表");
dataGridView1.DataSource = mydataset.Tables["操作员信息表"];
}
请高给我代码。小弟先谢谢了。