我该怎么把DataSet中的数据绑定到DataGridView 中的ComboBox中的呢???
解决方案 »
- 求翻译如下两个算法题
- .net 新手 关于数据库查询的问题
- VS 2005(.net 2.0)的编译 csc.exe问题
- 请问一个winform问题
- 为什么VS2005 winform的工具栏图标分辨率会降下来,怎样指明定为32位?
- 请问那里能下载Microsoft Application Blocks for .NET?
- 单击退出菜单时,询问是否退出,YES-退出,NO-不退出。那么如何在单击表单的叉叉按钮关闭时也响应这种事件呢?TKS。
- 为什么有时候我打开一些项目的时候,无法启动调试模式呢
- xml中的二进制问题(结帖率100%,行就给分)
- 找寻Dylan(路德一族)先生:
- 用C#写的Winforms程序,如何生成单独的EXE文件
- C#能不能动态声明数组?
例如
private void GridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (e.Control is DataGridViewComboBoxEditingControl)
{
if (this.GridView1.CurrentCellAddress.X == titleColumn.DisplayIndex)
{
comboTitle = e.Control as ComboBox;
if(comboTitle != null)
{
comboTitle.DropDownStyle = ComboBoxStyle.DropDown;
comboTitle.DataSource = MyDataSet.Tables[0];
comboTitle.SelectedIndexChanged -= new EventHandler(Combobox_SelectedIndexChanged);
comboTitle.SelectedIndexChanged += new EventHandler(Combobox_SelectedIndexChanged);
}
} }