文件名称:C-Sharp-DataGridView
- 所属分类:
- 组合框控件
- 资源属性:
- [Windows] [Visual.Net] [Basic/ASP] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- m***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在自定义类似dropdownlist类型的单元格时,按照通常的方法,在点击输入的时候显示的是正常的文本,而输入完成后单元格显示的是实际值,并不符合我们的合适习惯.
本例通过在EditingControlFormattedValue中返回combobox的selecteditem ,
在自定义单元格控件时重写GetValue,GetFormattedValue
解决了 显示时显示的是绑定的实际值,而输入选择时显示的是显示的字段的问题.
具体实现见附件,也请大家指教-Custom similar to the the dropdownlist type of unit cell in the usual way, click on the input display is normal text, while the input is complete, the cell is the actual value does not comply with the appropriate habits in this case rewrite the GetValue return to the combobox in EditingControlFormattedValue selecteditem custom cell control GetFormattedValue resolve displayed is the actual value of the binding when the input selection is shown in the display field to achieve specific see annex, please advise
本例通过在EditingControlFormattedValue中返回combobox的selecteditem ,
在自定义单元格控件时重写GetValue,GetFormattedValue
解决了 显示时显示的是绑定的实际值,而输入选择时显示的是显示的字段的问题.
具体实现见附件,也请大家指教-Custom similar to the the dropdownlist type of unit cell in the usual way, click on the input display is normal text, while the input is complete, the cell is the actual value does not comply with the appropriate habits in this case rewrite the GetValue return to the combobox in EditingControlFormattedValue selecteditem custom cell control GetFormattedValue resolve displayed is the actual value of the binding when the input selection is shown in the display field to achieve specific see annex, please advise
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DropDownListEditingControl.cs
DropDownListCell.cs
DropDownListColumn.cs
DropDownListCell.cs
DropDownListColumn.cs