Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DropDownWidth ignored in DataGridViewComboBoxColumn
Message
From
26/05/2007 14:58:31
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
DropDownWidth ignored in DataGridViewComboBoxColumn
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01228729
Message ID:
01228729
Views:
101
To reproduce

1. Run the code.
2. Open dropdown list

Observed:

Dropdown list width is same as column width

Expected:

Dropdown list width must be greater than column width

How to make dropdown list width greater than column width in DataGridView ?

using System;
using System.Windows.Forms;

class Form1 : Form {

[STAThread]
static void Main() {
try {
Application.Run(new Form1());
}
catch (Exception e) {
MessageBox.Show(e.ToString());
}
}

private DataGridView dataGridView1 = new DataGridView();

public Form1() {
Controls.Add(this.dataGridView1);
Load += new EventHandler(Form1_Load);
}

private void Form1_Load(object sender, EventArgs e) {
DataGridViewComboBoxColumn
col = new DataGridViewComboBoxColumn();
col.DropDownWidth *= 3;
dataGridView1.Columns.Add(col);
}
}
Andrus
Reply
Map
View

Click here to load this message in the networking platform