2012年6月19日

C# DataGridView 编辑单元格保存时防止单元格在编辑状态而产生空值

摘要: DataGridViewCellcell=this.dataGridView.CurrentCell;this.dataGridView.EndEdit();this.CurrentCell=null; 阅读全文

posted @ 2012-06-19 15:44 空白画映 阅读(3329) 评论(1) 推荐(0)

C# ComboBox绑定及DataGridView禁止DataSource自动创建列

摘要: ComboBox绑定DataTabledt=newDataTabledt=//数据集this.DisplayMember=//要显示属性的字段this.DisplayMember.ValueMember=//要显示值的字this.comboBox.DataSource=dt;DataGridView禁止DataSource自动创建列this.DataGridView.AutoGenerateColumns = false; 阅读全文

posted @ 2012-06-19 15:39 空白画映 阅读(4334) 评论(0) 推荐(0)

导航