DataGridViewComboBoxCell allows you to select a value for the respective DataGridView cell, from the list of values (available in popup displayed). The user can select item by clicking on an item or can use arrow keys to pick up from the available list or can type a value.
Questions tagged [datagridviewcomboboxcell]
196 questions
0
votes
1 answer
Problems with DataGridView when add new items
When I save a new item on datagridview the statement
MessageBox.Show(this.tb_aprovacao_admissaoDataGridView.CurrentRow.Cells[0].Value.ToString());
shows the value -1. How can I change it to show the real number of ID?
Thanks to everyone.

Mauricio
- 1
0
votes
0 answers
CellValuePushed event for Datagridview not fired in C#
I am having DataGridView in a winforms application with a number of ComboBox control. I converted the ComboBox to make it editable.
However, since then, the changes in the column are not being updated in the underlying class object.
When I debug…

Kiran
- 8,034
- 36
- 110
- 176
0
votes
2 answers
How to add an event for a ComboCoxColumn cell being changed
I have a DataGridView, with several ComboBoxColumns in it. Is there a way to create an event, so that each time a ComboBoxColumncell is entered and an item selected, the event fires?
All I can figure out so far is this:
private void…

Amanda_Panda
- 1,156
- 4
- 26
- 68
0
votes
0 answers
Can't see dropdown items in Datagridviewcomboboxcell
I have created Datagridviewcomboboxcells as follows, each of which have 2-3 items.
I'm able to see the Datagridviewcomboboxcells with the appropriate values inside the comboboxcell, but I'm not able to see the dropdown list when i click on the…

Sharat Chandra
- 4,434
- 7
- 49
- 66
0
votes
1 answer
Adding Combobox to datagridviewcell throwing index out of range exception
This is my code which is throwing an exception on dgv2Cb.
Can anybody tell me where I'm going wrong ?
Dim dgv2Cb As New DataGridViewComboBoxCell
Dim str1 = "Port"
Dim rowIndex = 0
If str1 = "Port" Then
dgv2Cb.Items.Add("1")
…

Sharat Chandra
- 4,434
- 7
- 49
- 66
0
votes
1 answer
Adding a comboboxcell to datagridview dynamically
I have a datagridview that gets populated dynamically. I want some of the columns to get populated with a combobox depending on some condition.
But my comboboxcell gets added at the bottom most row instead of the proper row.
Can anybody tell me what…

Sharat Chandra
- 4,434
- 7
- 49
- 66
0
votes
2 answers
Unbound DataGridView : Need ComboBox In cell of 2nd column only when user clicks cell
I have a unbound DataGridView with two columns. First column is just string values.
Second column I want to display a combobox, only when user click the cell(not the whole column as DataGridViewColumn). I use the below code which is incorrect and…

Tony Dsouza
- 25
- 1
- 5
0
votes
1 answer
How to display text in DataGridViewComboBoxColumn when the databound value is null
I have a databound DataGridView with a DataGridViewComboBoxColumn. If the combobox value is null I want to display a text. I do not want to add a null item to the databound list as I need to display different text in each datagridview line.
How…

Daniel
- 1,391
- 2
- 19
- 40
0
votes
1 answer
best way to handle datagridviecomboboxColumn selected index change
I have a problem on my datagridview containing datagridviecomboboxColumn. i need fire a selectedindex change event after the user selected new items from the combobox. how can i do that? i have a work around but it seems lik it might not be…

jersoft
- 478
- 2
- 9
- 20
0
votes
1 answer
How to populate and select data in comboboxcell in datagridview
Friends, I've a datagridview in my windows application. It has 6 columns, out of which the 2nd(colindex 1) is of type combobox. Others are of textbox type. I've to populate this combobox from table1. There are two columns in table1 - ID and Name.…

Sukanya
- 1,041
- 8
- 21
- 40
-1
votes
2 answers
Sorting DataGridView ComboBox Values
i've been trying to sort out some values that i currently add to the comboboxcell through a loop and i use the sort with the dataview however this is only sorting through the 1 number of the value and not taking into consideration the rest of the…

Steven Lemos
- 3
- 2
-1
votes
1 answer
Issue in bind DataGridViewComboBoxCell in DataGridView
I need help to fix my code:
for (int P = 0; P < DataGridView.Rows.Count - 0; P++)
{
TNTDATADataContext Context = new TNTDATADataContext();
var q = (from C in Context.Customers
where C.Code == Code.Text && C.CompanyId == CompanyId
…

omstackoverflow
- 15
- 4
-1
votes
1 answer
Simulating OnClick event for DataGridViewCheckBox?
VB or C#... A trivial task at the first sight. For DataGridViewCheckBox, create OnClick() method which is called if and only if value of checkbox was changed by user (using Space or left mouse click).
Perhaps there aleady is such an event –…

miroxlav
- 11,796
- 5
- 58
- 99
-1
votes
2 answers
How to prevent going to next row after editing a DataGridViewComboBoxColumn and pressing EnterKey?
I've got a form with a DataGridView.
In the Datagridview I have some DataGridViewComboBoxColumn and some DataGridViewTextBoxColumn.
The problem is that I want to use Enter instead of Tab to switch from one cell to another, even when I'm in editmode…

Bruno Pacifici
- 1
- 3
-2
votes
2 answers
Set SelectedValue in DataGridViewComboBoxColumn or DataGridViewComboBoxCell
I would like to set a value to the ComboBox in the DataGridView. I already have changed the comboBoxItems, I just want to select one of them. Thank you in advance!!!

Emmanuel
- 21
- 1
- 3