博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年10月28日

摘要: 不好意思,小小的欺骗大家了。我的DataGridView里没有这一列,实际上呢又实现了这一功能,主要是将一个定义好的ComBoBox添加到一列中,达到DataGridViewComboBoxColumn效果,代码如下:using System;using System.Data;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Text;using System.Windows.Forms;namespace MyNameSpace{ public par 阅读全文

posted @ 2011-10-28 15:14 moss_tan_jun 阅读(4926) 评论(0) 推荐(0)

摘要: privatevoiddgvInfoPerson_EditingControlShowing(objectsender,DataGridViewEditingControlShowingEventArgse){if(dgvInfoPerson.CurrentCellAddress.X==dgvInfoPerson.Columns["colCboDeptNo"].Index){cbo=e.ControlasComboBox;if(cbo!=null){cbo.DropDownStyle=ComboBoxStyle.DropDown;cbo.AutoCompleteMode=A 阅读全文

posted @ 2011-10-28 14:46 moss_tan_jun 阅读(841) 评论(0) 推荐(0)