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
0 answers
C# DataGridView with ComboBox always showing the combobox?
So I have a DataGridView with one column set to type ComboBox. When I add a new row, I populate the combobox for the cell like so:
foreach (Job cJob in cJobs)
{
cbItem = new ComboboxItem();
cbItem.Text = cJob.Name;
cbItem.Value =…

Jay Croghan
- 445
- 3
- 16
0
votes
0 answers
combobox selected value wont filter any more after clearing items
I use Combobox to filter Datagridview data loaded from a database.
When form loads, datagridview and combobox get filled by data. Combobox doesn't have selected values, but when I choose an item from a dropdown, datagridview filters data just…

Boris P
- 86
- 2
- 10
0
votes
0 answers
Handling the SelectedIndexChanged event handler in DataGridViewComboBoxCell
I have two related issues here with my derived class.
I am trying to add a SelectedIndexChanged event handler. It is certainly getting called:
class DataGridViewColourComboBoxCell : DataGridViewComboBoxCell
{
public override void…

Andrew Truckle
- 17,769
- 16
- 66
- 164
0
votes
1 answer
Using CellPaint event handler with DataGridView
The idea here is that I redraw the combol "cell" so that it shows the block of colour and text. This is when form displays and it is about to show the dropdown:
After I have selected a colour it does weird:
Now it is all wrong. I have to hover the…

Andrew Truckle
- 17,769
- 16
- 66
- 164
0
votes
2 answers
Exception when adding a new row to my DataGridView
I have this issue. It starts like this:
I can double-click the drop arrow and pick a colour OK:
At this point, I can click the dropdown again and it is correctly selected:
The issue is when I want to add a new row. Even if I just go to click on…

Andrew Truckle
- 17,769
- 16
- 66
- 164
0
votes
1 answer
Dataset to set default SelectedValue in DatagridViewComboboxColumn rows
I have a DataGridView (dgwList), into which I load set of items. It's an intermediate form, where user needs to select Action and Category, for which I created DataGridViewComboBoxColumns and set them in Form_Load event like this:
dtCats =…

Oak_3260548
- 1,882
- 3
- 23
- 41
0
votes
1 answer
Can items of DataGridViewComboBoxColumn be of custom object type?
In a DataGridViewComboBoxColumn I need to use values of my class MyValue as combo box items (in Items property), but I am getting a DataError during the runtime when leaving the combobox column in which I selected any of my values.
How can be…

miroxlav
- 11,796
- 5
- 58
- 99
0
votes
1 answer
How to prevent datagridviewcomboboxcolumn selected index to change?
I am using a
datagridview,
in that i am using a
datagridviewcomboboxcolumn.
There are three rows in this datagridview so that there are three combobox created in each of these rows in datagridviewcomboboxcolumn.
These comboxes have same items but…
user4860969
0
votes
1 answer
How to set a single ComboBoxCell in a TextBoxCell column of DataGridView?
I have a DataGridView with two columns defined like:
Dim col As New DataGridViewColumn
col.DefaultCellStyle.BackColor = Color.FromArgb(&HFFAAAAAA)
col.Name = "Description"
col.MinimumWidth = 80
col.DataPropertyName = "Description"
col.ValueType =…

Drake
- 8,225
- 15
- 71
- 104
0
votes
1 answer
How to set a data grid column to be a drop down when binding to a table
I am able to create a data table and bind it to a datagridview. If possible I want something more sophisticated. I want to limit the first column to values 1 to 12 and the 2nd column to either AM or PM.
Thanks in advance.
mDataTable =…

Bob Avallone
- 379
- 1
- 10
- 29
0
votes
1 answer
how to add a combo box in a datagrid view for only one cell dynamically
I am reading an xml file using dataset and then i am creating a datagridview and assigning the table from dataset to datagridview.datasource dynamically.
The problem i am facing here is, i want to add a combobox for one cell in datagridview.
Below…

Nihal Kumar
- 1
- 1
- 5
0
votes
0 answers
Data Grid View when cell is del key is pressed
I have a data grid view in when press delete key in group type cell then an other form with DGV open.
It then select a value form it but value is changing but the are not showing always empty in it is window application in C#

Mack
- 1
- 2
0
votes
1 answer
Why can't I assign this DataGridViewComboBoxCell to the cell I want?
I'm having a weird set of problems with my DataGridViewComboBoxCell objects. FYI, I am using the Cell rather than the Column because my data is organized by row, not by column.
My first problem is that I can't seem to get the assignment right to my…

Quicksilver
- 295
- 4
- 16
0
votes
0 answers
datagridviewcomboboxcell not updating when select
I have many List:
List list1 = new List(){ 1, 2, 3};
List list2 = new List(){ 1, 2};
List list3 = new List(){ 1, 2, 3, 4};
And I have this code:
foreach (Subtipo STC in lista.Subtipos)
{
…

Sponsor
- 368
- 4
- 9
0
votes
1 answer
DataGridViewComboBoxCell valueValue is invalid with binded DataGridViewComboBoxCell
I have a DatagridView with two DataGridViewComboBoxCell:
Administration
Employee.
What I want to do is when I select an administration from 1st
DataGridViewComboBoxCell, I'll get the list of the employees of selected
Admininstration in the 2nd…

user4374239
- 93
- 2
- 11