Include a search button inside a gridview c#cell

Asked

Viewed 491 times

1

I have the following problem:

I have a gridView on a Windows form system that I am developing with c#. This grid will serve for the user to include items of a quote. In the product cell, where the user enters 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 well in the corner of the cell will serve for the user to search the existing products.

Is it possible to do that ? I searched the net but found nothing similar.

Thank you....

1 answer

2

From what I understand you want to create a Combobox on the grid. The code below solves:

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);
  • Actually no, I’m trying to create a button. It’s an ellipse button, it calls. An example of this button is in the Grid properties, when you click on the Columnheadersdefaultcell option... From there, it allows you to type or click the button with the three "dots" ... and after clicking this button it opens a window... I wanted to do this on my grid.

  • I can find a solution like this for you. But you’ll have to implement a window to search the items this way...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.