Questions tagged [datagridviewcomboboxcell]

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.

196 questions
28
votes
3 answers

Event that fires during DataGridViewComboBoxColumn SelectedIndexChanged

I have DataGridView with two columns. The first column is TextBoxCol(DataGridViewTextBoxColumn) and the Second one is ComboBoxCol(DataGridViewComboBoxColumn). How can I change the value of TextBoxCol when ComboBoxCol changes its selected index…
Kalix Diona
  • 469
  • 1
  • 5
  • 10
20
votes
3 answers

Open dropdown(in a datagrid view) items on a single click

How can i avoid the double click on a DropDownButton used within a DataGridView? Right now I am able to view the drop down items within the DataGridView by clicking two or more times. First time it selects the cell and second time when I click on…
NewBie
  • 1,824
  • 8
  • 35
  • 66
9
votes
2 answers

How to show set default value for DataGridViewComboBoxCell Value in winform?

I have a DataGridView having one DataGridViewComboBoxColumn and I have populated that ComboBox but after clear that DataGridView I have to set one default value for that ComboBox So please help me out.
Prakash Kunwar
  • 797
  • 4
  • 14
  • 28
7
votes
2 answers

DataGridViewComboBoxCell : How to set selected value when adding a row?

I have this form that lets user choose a (Code - Product) item from a comboxbox. input quantity and price and Add it to a list. Loading the inventories to the form private List inventories = new Inventory().read_inventory(); Setting the…
android-guy
  • 339
  • 1
  • 3
  • 12
7
votes
3 answers

Programmatically add cells and rows to DataGridView

I'm struggling with DataGridViewComboBoxCell. On some cases (let's say, events) I must preselect a value of ComboBox in my Form's DataGridView. When user changes one box, I am able to change another programatically like this: var item =…
6
votes
2 answers

What a strange behavior in AutoComplete in DataGridViewCombobox column?

I am using the (EditingControlShowing) event to Enable AutoComplete in DataGridViewComboBox Column. private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { if (e.Control is…
5
votes
4 answers

System.ArgumentException: DataGridViewComboBoxCell value is not valid

dataGridView.Rows.Add( metaData.Offset.ToString("X2"), metaData.Length, metaData.Format, // This parameter goes to a ComboBox cell which throws an metaData.Description, // exception above …
LEMUEL ADANE
  • 8,336
  • 16
  • 58
  • 72
5
votes
4 answers

How do I get DataGridView comboboxes to display their drop down list in one click?

After I set "EditOnEnter" to be true, the DataGridViewComboBoxCell still takes two clicks to open if I don't click on the down arrow part of the combo box. Anyone have any clue how to fix this? I've got my own DataGridView class that I use, so I can…
Isaac Bolinger
  • 7,328
  • 11
  • 52
  • 90
5
votes
1 answer

C# Runtime Error: "DataGridViewComboBoxCell value is not valid"

I've been working most of the day on this, and the solution continues to elude me. My Winform application contains a DataGridView wherein two of the columns are ComboBox dropdown lists. Oddly, the DataGridView appears to populate correctly, but it…
Jim Fell
  • 13,750
  • 36
  • 127
  • 202
5
votes
3 answers

How to switch between DataGridViewTextBoxCell and DataGridViewComboBoxCell?

I want to have a DataGridView that has two columns. The first column will always be of type DataGridViewComboBoxColumn. Based on the selection in that column, I'd like to be able to change the corresponding cell in the second column to either a…
4
votes
1 answer

Show Selected Image in DataGridView with DataGridViewComboBoxColumn?

I have a problem in using DataGridView with DataGridViewComboBoxColumn to let user to select an image from a list of images. Following the discussions in the Question titled "Custom draw of DatagridViewComboBoxColumn" ref Link. I also face the…
4
votes
2 answers

DataGridviewComboBox requires 2 clicks to show the list of items

Possible Duplicate: Open dropdown(in a datagrid view) items on a single click We have a DataGridView where one column is a ComboBox with the DropDownButton style. The DataGridView is in FullRowSelect mode. Let's assume that I have 5 rows, and row…
4
votes
1 answer

Databinding a combobox column to a datagridview per row (not the entire column)

There are a few posts about this, but after hours of searching I still can't find what I need. The answer in the following post almost gets me what I want: Combobox for Foreign Key in DataGridView Question 1: Going off that example where a Product…
4
votes
3 answers

DataGridViewComboBoxCell.DataSource being set to null once form is shown

I'm adding a DataGridViewComboBoxColumn to a DataGridView during the form's Load event handler and setting the DataSource of each DataGridViewComboBoxCell in the columns. However, once the form is shown, the DataSource of each…
Phil Downey
  • 181
  • 2
  • 10
4
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…
1
2 3
13 14