Questions tagged [datagridviewcombobox]
254 questions
4
votes
4 answers
Why does DataGridViewComboBoxColumn display a ValueMember?
I have a small problem. DataGridViewComboBoxColumn displays a value from ValueMember and not from DisplayMember. The grid works fine and when I select something from this column I see the DisplayMember value, but when the focus gets lost, the grid…
![](../../users/profiles/874943.webp)
wertyk
- 400
- 7
- 28
3
votes
1 answer
Datagridivew DataGridViewComboBoxColumn select value member
i have datagridview which has one combobox column. i populate combobox column. when i select any text from combobox column then i need to get the value when i read the data in for loop.
dgFilter is here datagridview
…
![](../../users/profiles/508127.webp)
Thomas
- 31,089
- 118
- 335
- 589
3
votes
1 answer
Retrieve datarow behind datagridviewcombobox while databound
I have a databound DataGridView. One of its columns is DataGridViewComboBox. The DataGridViewComboBox is also databound. Everything is working just fine until I wish to retrieve the DataRow behind the DataGridViewComboBox selected item (not the…
![](../../users/profiles/885957.webp)
Daniel
- 1,291
- 2
- 16
- 35
3
votes
2 answers
How to make a ComboBox of a DataGridViewComboBoxColumn accept user new items?
Using a DataGridViewComboBoxColumn, the goal is to make the ComboBoxes accept user's new items and also the possibility of choosing items that are already present.
I'm aware of using EditingControlShowing event of the DataGridView to change the…
![](../../users/profiles/53094.webp)
didi
- 619
- 6
- 10
3
votes
2 answers
DataGridView ComboBox EditingControlShowing events
I have a basic WinForms app with d DataGridView (named dgvHardware) control on it, bound to this control is this code:
private void dgvHardware_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if…
![](../../users/profiles/845807.webp)
Fuginator
- 219
- 3
- 5
- 14
3
votes
3 answers
How to make ComboBox column in DataGridView?
I have DataGridView with 2 columns:
Fname | Age
I need to show Age in ComboBox (that i can pick the age between 1 to 100).
When I press the button (save button for example) the Age value will be saved to the database. (I work with access)
Can i get…
![](../../users/profiles/569466.webp)
Gali
- 13,473
- 25
- 77
- 105
3
votes
1 answer
Creating Dynamic DataGridViewComboBoxCells
So here is my situation. I have a DataGridView, which has two columns that I am trying to set up as DataGridViewComboBoxColumns called "Received" and "Backordered".
The point of these combo boxes is to create a drop down menu to select how many…
![](../../users/profiles/3711832.webp)
Skitzafreak
- 1,387
- 4
- 22
- 39
3
votes
1 answer
Selected items in DataGridViewComboBoxColumn always retrieve the first value
Assume the data I have are 'valuenumber1', 'valuenumber2', 'valuenumber3'.
I have a problem where when 'valuenumber2' or 'valuenumber3' is selected, the next row will be created but the previous row (having 'valuenumber2' or 'valuenumber3') will…
![](../../users/profiles/6033782.webp)
Megumi
- 53
- 7
3
votes
1 answer
DataGridViewComboBoxColumn behaves differently on Windows 7+ OS
I've made a client application in Windows Forms. I've used Windows Server 2008 R2 for development.
However client has reported few bugs which I am not able to reproduce on my machine but when I deploy same solution on Windows 7 or 10. It gives me…
![](../../users/profiles/6537860.webp)
Shaan
- 83
- 7
3
votes
2 answers
How to change DataGridView cell color based on value of Combobox?
I have a datagridview as below:
I would like:
When the form load, if the Gender column's value is Male, the corresponding color cell of column Name will be White
When if changes the value of the column Gender: Male → Female, color cell of the…
![](../../users/profiles/4971373.webp)
MinhKiyo
- 161
- 3
- 15
3
votes
1 answer
datagridview combobox list color changed to black c#
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
int n = dataGridView1.CurrentCell.RowIndex;
if (dataGridView1.CurrentCell.ColumnIndex == 0)
{
var…
![](../../users/profiles/3750025.webp)
babin raj
- 147
- 1
- 7
3
votes
2 answers
existing column with Combobox in datagridview in vb.net
I am trying to put a drop down on the existing column of the DataGridView. I am filling the grid from excel source and to a specific column i need drop down.
`
Dim comboBoxColumn As DataGridViewComboBoxColumn = New…
![](../../users/profiles/4365686.webp)
Nim Nagpal
- 49
- 3
3
votes
2 answers
Is it possible to insert unbound column into a bound datagridview?
I have a datagridview, bound to data and running swell. The data in two columns are integers, but they have a meaning that I would like the form user to see instead.
Column 1 Column 2 Column 3 Column…
![](../../users/profiles/1341735.webp)
ZL1Corvette
- 405
- 1
- 6
- 24
3
votes
2 answers
Change DataGridViewColumn to DataGridViewComboBoxColumn in bound DataGridView
I have a DataGridView bound to a DataTable and I use a SQLiteDataAdapter to update one SQLite database. I'm trying to make one of the columns a DataGridViewComboBoxColumn, but despite I can put items on it and change its cell values I'm no longer…
![](../../users/profiles/3380974.webp)
Gonzalo Faus
- 435
- 5
- 11
3
votes
1 answer
Multi column combo box or DataGridCombo Box columns shrinking
I have a multi column combo box.When i use it for the first time then it works fine then
when i clear it and again enter data into it,all the columns shrink and only 1-2 letters are visible from each row. But I want to display the text such as all…
![](../../users/profiles/2095195.webp)
Ronophobia
- 349
- 3
- 16