摘要:单行选中foreach (DataGridViewRow dr in this.dataGridView1.Rows) { try { //DataGridViewCheckBoxCell cbx = (DataGridViewCheckBoxCell)dr.Cells[0]; //if ((boo...
阅读全文
摘要:private void FillYearMonth() { List listDateTime = new List(); DateTime dtStart = Convert.ToDateTime("2015-1"); //开始时间 DateTime dtEnd = DateTime.Now;/...
阅读全文
摘要:bool enterkey; protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { enterkey = false; if (keyDat...
阅读全文
摘要:第一种:DataSet ds=new DataSet (); this.dataGridView1.DataSource=ds.Table[0]; 第二种:DataTable dt=new DataTable(); this.dataGridView1.DataSource=dt; 第三种...
阅读全文
摘要:C#winformDataGridView属性说明① 取得或者修改当前单元格的内容② 设定单元格只读③ 不显示最下面的新行④ 判断新增行⑤ 行的用户删除操作的自定义⑥ 行、列的隐藏和删除⑦ 禁止列或者行的Resize⑧ 列宽和行高以及列头的高度和行头的宽度的自动调整⑨ 冻结列或行⑩ 列顺序的调整? ...
阅读全文