Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How to add a combobox to an existing column of a DataGridView?

$
0
0

Hi all,

I need to convert a DataGridView Column to a combobox. I know we can add a column as below

            DataGridViewComboBoxColumn cmb = new DataGridViewComboBoxColumn();
            cmb.HeaderText = "Select Data";
            cmb.Name = "cmb";
            cmb.MaxDropDownItems = 4;
            cmb.Items.Add("True");
            cmb.Items.Add("False");
            dataGridView1.Columns.Add(cmb);

is there any way that we can change an existing column to a combobox.

Thank in Advance



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>