Questions tagged [datagridviewcombobox]
263 questions
0
votes
1 answer
How do I bind a DataGridViewComboBoxColumn
I want to populate a DataGridViewComboBoxColumn with a list of strings using vb.net. The DataGridView contains other columns which are very important to display as well.

Tassisto
- 9,877
- 28
- 100
- 157
0
votes
1 answer
Casting a DataGridViewComboBoxColumn item into another object fails
This method is part of my derived class from DataGridViewComboBoxColumn:
public ComboboxColourItem InsertColour(ushort iColourIndex)
{
ComboboxColourItem ocbItem = ComboboxColourItem.Create(iColourIndex);
bool bAppend = true;
if…

Andrew Truckle
- 17,769
- 16
- 66
- 164
0
votes
1 answer
winforms DataGridViewComboBoxColumn, ComboBox not clickable when DataPropertyName is set
I have DataGridView with DataGridViewComboBoxColumn with datasource binding, when I bind DataPropertyName of DataGridView, ComboBox becomes not clickable.
dgFMS.ReadOnly = false;
Correct DataPropertyName is bind with each row but I can not choose…

Kamran Qadir
- 466
- 10
- 20
0
votes
1 answer
C# change gridview column data according to gridview combobox?
I am trying to change the value of a cell in a datagridview column, depending on the selection in an added combobox column in the same datagridview.
I have twiked around with all sorts of BindingSources, but nothing seems to get it quite right.
The…

Nimrod Yanai
- 777
- 2
- 8
- 30
0
votes
2 answers
Set DataGridViewComboBox default equal to existing DataGridView column
I have added a DataGridViewComboBox to a bound DataGridView (grdBOOK), the DataGridViewComboBox will replace column 3 to allow for user selection. I'm struggling to set the default of the DataGridViewComboBox equal to the value of column 3 so user…

Zeus
- 1,496
- 2
- 24
- 53
0
votes
1 answer
Set color of specific item within a DataGridViewComboBox dropdown list
In the following example, how can I highlight (change the background color) of specific items in the dropdown list? To be specific, I am talking about the items in the "dropdown list" for the DataGridViewComboBox.
I want to highlight for the user…

User1
- 3
- 3
0
votes
1 answer
Adding and Populating DataGridViewComboBoxcolumn to Bound Datagridview
I'm attempting to allow a DataGridView to allow the user to edit fields (for simplicity's sake, let's say it's just Items, each of which can have a Condition, with allowable values taken from a second table [Conditions]
e.g.
Data Structure…

pbickford
- 59
- 1
- 14
0
votes
1 answer
Add a combo box to a DevXpress grid dynamically on GridView_RowCellClick
I am using a "DevXpress.XtraGrid.GridView" and I have written following code to display a combo box on a cell. It happens when user clicks on the cell. In Debug or Running mode, code get executed properly but nothing happens. Have I done any mistake…

Kushan Randima
- 2,174
- 5
- 31
- 58
0
votes
1 answer
DataGridViewComboBox Value is not valid
Background
I'm trying to set a column on my DGV up as a combobox. I've added all the columns to the gridview in the designer so all that is left is to bind them to the dataset.
The datatype of the Status column is varchar.
Question
However i keep…

KingCundy
- 75
- 1
- 8
0
votes
1 answer
update DataGridViewComboBoxColumn from another form
I have the following code to populate a DataGridViewComboBoxColumn
try
{
itemReader = sc.ExecuteReader();
itemDT = new DataTable();
itemDT.Columns.Add("id", typeof(string));
…

jotnarta
- 1
- 1
0
votes
0 answers
DataGridViewComboBoxColumn do not update directly
I have one DataGridViewComboBoxColumn in FormA, and I have a button that opens another FormB which enable user from adding a new item. When the user add a new item, it will not appear until you reopen formA, I want the added item to appear directly,…

jotnarta
- 1
- 1
0
votes
1 answer
Select an item in Datagridviewcomboboxcolumn
I have a quite some experience with DataGridViews, I cannot resolve this super simple issue...
I have a datagridview with a comboboxcolumn pre-set possible options (3 simple options). I have a database with table, form which I want to select the…

Oak_3260548
- 1,882
- 3
- 23
- 41
0
votes
0 answers
Filtering Multiple Combobox VB.NET
I am creating a "Voting system" and i have problem on the ballot form.
Every time i choose candidate in my combobox, the rest of the combobox will also change.
here is my ballot form..
and when i choose my President candidate in my combobox1 this…

Superman
- 1
0
votes
0 answers
ValueMember wrong in DataGridViewComboBoxColumn
The class below is the data source for the combo of datagridview:
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public string City { get; set; }
}
The next is the data source for the…

Paulo Balbino
- 243
- 1
- 14
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