DataGridview中的组合框 [英] Combo Box in DataGridview
本文介绍了DataGridview中的组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
数据网格中的Combobox .....演示项目请给我
解决方案
这里的工作方式不一样。
以下是询问者的预期:
1. 首先尝试你想做什么!你可能会发现它并不那么难。
2.制定你所做的事情看似问题/不工作。
尝试一下,告诉你是否面临问题。
各位会员非常乐意帮忙。
我正在提供一个例子试试喜欢这个
这个 .dataGridView1.AutoGenerateColumns = 假跨度>;
this .dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this .dataGridView1.Columns.AddRange( new System.Windows.Forms.DataGridViewColumn [] {
this .Column1,
this .empDataGridViewTextBoxColumn,
< span class =code-keyword> this .empnameDataGridViewTextBoxColumn,
this .noofleaveDataGridViewTextBoxColumn});
this .dataGridView1.DataSource = this .employeeBindingSource;
此 .dataGridView1.Location = new System.Drawing.Point( 28 , 12 );
此 .dataGridView1.Name = dataGridView1 跨度>;
此 .dataGridView1.Size = new System.Drawing.Size( 452 , 150 );
此 .dataGridView1.TabIndex = 0 ;
Combobox in datagridview .....demo project pls give me
解决方案
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Try them and tell if you face issues.
Members will be more than happy to help like this.
I''m providing an example try like this
this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Column1, this.empDataGridViewTextBoxColumn, this.empnameDataGridViewTextBoxColumn, this.noofleaveDataGridViewTextBoxColumn}); this.dataGridView1.DataSource = this.employeeBindingSource; this.dataGridView1.Location = new System.Drawing.Point(28, 12); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Size = new System.Drawing.Size(452, 150); this.dataGridView1.TabIndex = 0;
这篇关于DataGridview中的组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文