471,330 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

make dropdown winder than column in DataGridView

I need to make dropdown list wider than column width.
I tried code below but dropdown width is not increased when I open dropdown.
How to increase it ?
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);
}
}
Jun 27 '08 #1
0 1249

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Veeneman | last post: by
reply views Thread by mahesh.nimbalkar | last post: by
reply views Thread by PromisedOyster | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.