H
H
HEDAX2020-04-21 15:48:02
WPF
HEDAX, 2020-04-21 15:48:02

How to refer to ComboBox located in DataGridView?

I have a DataGridView with one column of type ComboBox.
I have two lines, how can I change the text in the ComboBox in their ComboBox?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-04-21
@firedragon

I didn’t understand anything, but just in case, advice, when the date is bound, an event is triggered, you process the cells in it and find the necessary controls and do everything you need.
By the way, why not make your own cage?

H
HEDAX, 2020-04-21
@HEDAX

It was solved like this:
DataGridViewComboBoxCell cell = (DataGridViewComboBoxCell)Tips_memory_table.Rows[0].Cells[0];
cell.Items.Add("Select");
cell.Value = "Select";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question