网站大量收购独家精品文档,联系QQ:2885784924

datagridview的combox联动.doc

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
datagridview的combox联动

datagridview的combox联动?? ?最近整datagridview的combox联动问题,主要就是datagridview的combox数据绑定问题,怎么也搞不定,后来用来一个ws的方法,就是datagridview上动态添加combox,而不是把datagridview的列设为datagridviewcomboboxcolumn(因为这样没搞定),就是点击datagirdview的某个cell时,在该cell上显示一个combox,让用户选择并把值传到datagridview的cell中 还有个问题就是combox..Height设置combox的高度是没有用的,最后只好用api搞定。 相关代码,designer.cs 1.namespace?WindowsFormsApplication1 2.{ 3.????partial?class?gvForm 4.????{ 5.????????///?summary6.????????///?Required?designer?variable.7.????????///?/summary8.????????private?System.ComponentModel.IContainer?components?=?null; 9.10.????????///?summary11.????????///?Clean?up?any?resources?being?used.12.????????///?/summary13.????????///?param?name=disposingtrue?if?managed?resources?should?be?disposed;?otherwise,?false./param14.????????protected?override?void?Dispose(bool?disposing) 15.????????{ 16.????????????if?(disposing??(components?!=?null)) 17.????????????{ 18.????????????????components.Dispose(); 19.????????????} 20.????????????base.Dispose(disposing); 21.????????} 22.23.????????#region?Windows?Form?Designer?generated?code24.25.????????///?summary26.????????///?Required?method?for?Designer?support?-?do?not?modify27.????????///?the?contents?of?this?method?with?the?code?editor.28.????????///?/summary29.????????private?void?InitializeComponent() 30.????????{ 31.????????????this.dataGridView1?=?new?System.Windows.Forms.DataGridView(); 32.????????????((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 33.????????????this.SuspendLayout(); 34.????????????//?35.????????????//?dataGridView136.????????????//?37.????????????this.dataGridView1.AllowUserToAddRows?=?false; 38.????????????this.dataGridView1.AllowUserToDeleteRows?=?false; 39.????????????this.dataGridView1.ColumnHeadersHeightSizeMode?=?System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 40.????????????this.dataGridView1.Dock?=?System.Windows.Forms.DockStyle.Fill; 41.????????????this.dataGridView1.Location?=?new?System.Drawing.Point(0,?0); 42.??????

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档