1、复写 Edit方法:
protected override void Edit(System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible)
2、加入如下两个方法:
private void ComboSelectedText(object sender,EventArgs e)
{
if(blnCanSet)
{
SetColumnValueAtRow(objSource,intCurrentRow,cboColumn.Text);
}
}
private void ComboTextChanged(object sender,EventArgs e)
{
if(blnCanSet)
{
SetColumnValueAtRow(objSource,intCurrentRow,cboColumn.Text);
}
}
protected override void Edit(System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible)
2、加入如下两个方法:
private void ComboSelectedText(object sender,EventArgs e)
{
if(blnCanSet)
{
SetColumnValueAtRow(objSource,intCurrentRow,cboColumn.Text);
}
}
private void ComboTextChanged(object sender,EventArgs e)
{
if(blnCanSet)
{
SetColumnValueAtRow(objSource,intCurrentRow,cboColumn.Text);
}
}
解决方案 »
- VS2010 添加数据源 “使用SQL Server身份验证”失败
- return bool?类型问题
- 当操作的文件较大时,文件关闭后,File.Move方法操作失败
- 数据表与控件绑定后,我用程序改变了控件中的值,保存时数据表中的值为什么不更新呀?
- 算法相关。顶者有分。
- 关于定时询问多个IP地址的问题..大家帮出出主意.
- 腾讯浏览器的bmp文件是怎么实现旋转播放的
- 高分:弹出一个层,层里面要包含treeview节点是从数据库中读出来的
- 请问那里可以下到rational xde for .net 的电子书或者帮助之类的东西?
- 关于C#数据库的书或资料的求救!!!
- ADO.net和DataGrid的小问题两个,推者有分,高手请进
- 请问:如何在c#的code-behind中调用页面的客户端javascript脚本。
cboColumn = new ComboBox();
cboColumn.DropDownStyle = ComboBoxStyle.DropDown;
cboColumn.Text = "";
cboColumn.Visible = false;
cboColumn.SelectedIndexChanged += new EventHandler(ComboSelectedText);
cboColumn.TextChanged += new EventHandler(ComboTextChanged);