Include a search button inside a cell gridview c #

1

I have the following problem:

I have a gridview on a Windows form system that I'm developing with C #. This grid will serve for the user to include items of a quote. In the product cell, where the user types the product code, I would like a button to appear as soon as the cell is ready for editing, that is, as soon as it allows the user to type. This button, appearing right in the cell's corner will serve for the user to search for existing products.

Is it possible to do this? I searched the net but found nothing like it.

Thank you ....

    
asked by anonymous 25.07.2014 / 15:52

1 answer

2

So I understand you want to create a ComboBox on the grid. The code below resolves:

DataGridViewComboBoxColumn cmb = new DataGridViewComboBoxColumn();
cmb.HeaderText = "Selecione um produto";
cmb.Name = "cmb";
cmb.Items.Add("Arroza");
cmb.Items.Add("Feijão");
dataGridView1.Columns.Add(cmb);
    
26.07.2014 / 20:05