Questions tagged [datagridviewcombobox]

263 questions
1
vote
1 answer

Example of CLI/C++ dataGridView - setting index of comobox cell list

I am trying to set up a dataGridView in MS CLI/C++. Simply if I have a list of letters (Say A - D) I want to populate the dataGridView type. what I want to do is to create a for loop that will populate each cell with a Letter like Row(0) Cell(0)…
1
vote
1 answer

Dynamically add item to DataGridView ComboBox Column by typing in the cell

I have a DataGridView that has a ComboBox column and I must update each ComboBox's possible values when its drop down shows. I also must make the ComboBoxes capable of having custom typed values. When a new value is typed, it should be added to the…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
1
vote
1 answer

Adding several datasource on same column in DataGridView

I'm working on VB .NET 2008. Target: Bind dynamic datasource in a cell of a Windows.Forms.DataGridView depending on the selection in previous column. The grid must have 7 columns. If the selection on comboboxcolumn 2 or 4 is done, the datasource of…
Nemesys
  • 39
  • 2
  • 10
1
vote
1 answer

Why is this event handler method being repeatedly called?

The DataGridViewComboBoxColumn control can be difficult to work with. I've been fighting various permutations of this code for two long days, so I've decided to throw in the towel and seek some assistance. The latest incarnation of weirdness is a…
InteXX
  • 6,135
  • 6
  • 43
  • 80
1
vote
1 answer

How to get a ComboBox in a DataGridViewCell to drop down after a single click?

I have a DataGridView which has it's first column's style set to a ComboBox rather than the default TextBox. Since the number of rows in the DataGridView is not fixed on startup I cannot load in data to the ComboBoxes for each row when a new row is…
G. LC
  • 794
  • 1
  • 8
  • 27
1
vote
2 answers

How to bind DataGridViewComboBoxColumn to a OnChange event (C#)

I have a standard DataGridView, and my last column is a DataGridViewComboBoxColumn. I would like to add an event so that when the selected index of any of the rows in that column changes, an event is triggered and I save that data to db. I'm…
Andrej
  • 227
  • 2
  • 3
  • 6
1
vote
1 answer

How to change DataGridView column type after binding

I have loaded a DataGridView called dgvPrint with a List which retrieve from database as follows: dgvPrint.DataSource = ReservedServices.GetAll(); The result is like as below: Worker column and ServiceType column are some integers which refer to…
Hosein Aqajani
  • 1,553
  • 4
  • 26
  • 46
1
vote
1 answer

Why does showing the drop-down list require two clicks in a DataGridView?

I am using a drop-down list in DataGridView control, but the problem is that for the first time I click the drop-down, it takes two clicks to drop down the list and show, but afterwards it works fine. private void ViewActiveJobs_CellClick(object…
Afnan Bashir
  • 7,319
  • 20
  • 76
  • 138
1
vote
2 answers

grid view combobox

how to add items to a data grid view combo box
sara
1
vote
1 answer

Add items to combobox in an already existing datagridview comboBox column

I have a datagridview in my Windows form Application. The datagridview has 3 column. First column is Combobox. I am trying to add item to the Combo box but it is working. Here is the code( Language C#) foreach (int counter=0; counter<5;…
1
vote
1 answer

DataGridView bound to list(of T) change column type

I have a datagridview the is bound to a List(of T). Private BodyComponents As New List(Of BodyComponent) Private BodyBinding As BindingSource Public Sub New() ' This call is required by the designer. InitializeComponent() ' Set the…
Mech_Engineer
  • 535
  • 1
  • 19
  • 46
1
vote
1 answer

How to fire & catch DataGridViewComboBoxCell.MouseDoubleClick event and open another form from this event?

I am working on project in which I have a datagridview containing normal textbox cells & comboboxcells too, I can catch mouseDoubleClick event in normal textbox cells from datagridview's MouseDoubleClick event handler. But I have no idea about how…
1
vote
1 answer

Binding DataGridView to DataTable with ComboBox not working

I'm trying to create a DataGridView bound to a DataTable where one column is a ComboBox. The code runs but I get the following error after binding (not when data is bound): System.ArgumentException: DataGridViewComboBoxCell value is not valid. In…
JayByte
  • 74
  • 1
  • 9
1
vote
0 answers

Designer duplicating datasource in DataGridViewComboBoxColumn

I have a custom control that inherits from a DataGridView. It has pre-defined columns. One of the columns is a ComboBox column. I want it so that users can select an hour of the day, so it binds to a datasource that is an array of integers, from 0…
ainwood
  • 992
  • 7
  • 17
1
vote
1 answer

How can I get a column in a DataGridView to autosize to the contents of a Combobox?

I have a column in a DataGridView with the column type DataGridViewComboBoxColumn . In this combo box, I have several strings of varying length. Some of these strings can be changed by the users in the application settings. It looks something like…
kvermeer
  • 458
  • 3
  • 12