随笔分类 -  WinForm

摘要:第一种:DataSet ds=new DataSet (); this.dataGridView1.DataSource=ds.Table[0]; 第二种:DataTable dt=new DataTable(); this.dataGridView1.DataSource=dt; 第三种:Data 阅读全文
posted @ 2016-12-20 21:07 ZHANGKAIXUAN 阅读(714) 评论(0) 推荐(0)
摘要:private void btndel_Click(object sender, EventArgs e) { int count = 0; //获取选中的行数 count = this.dataGridView1.SelectedRows.Count; if (count == 0) { Mess 阅读全文
posted @ 2016-11-24 15:10 ZHANGKAIXUAN 阅读(386) 评论(0) 推荐(0)
摘要:注意:在DataGridView添加一列(name:delete),ColumnType属性为:DataGridViewCheckBoxColumn,FlaseValue属性为:Flase,TureValue属性为Ture,并设置DataGridView的ReadOnly属性为Flase。 阅读全文
posted @ 2016-11-24 13:39 ZHANGKAIXUAN 阅读(1824) 评论(2) 推荐(0)