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
1
vote
2 answers

How to manually select the DataGridviewComboBoxCell Value in CellContentClick Event?

Hi Programmers, Actually I have a DataGridViewComboBoxCell in DataGridvIew and I need to change the DataGridViewComboBox value if the condition is true when the CellContentClick event is fired. My Code Goes Like this: …
Prakash Kunwar
  • 797
  • 4
  • 14
  • 28
1
vote
1 answer

Setting DataGridViewComboBoxCell items

I want to set the items of each DataGridViewComboBoxCell individually (beacause each combobox must have different items) in my DataGridView. I use this code to set the items: foreach (DataGridViewRow row in grid.Rows) { …
joaocarlospf
  • 1,129
  • 2
  • 13
  • 23
1
vote
1 answer

DataGridViewComboBoxCell with ComboBoxStyle Simple don't catch Enter key

In plain combobox when comboboxstyle is set as Simple and user something type in the field and then press Enter KeyUp event is fired. In datagridview when I have ComboboxColumn and style set as Simple KeyUp event isn't fired and KeyPress and…
Robert
  • 2,571
  • 10
  • 63
  • 95
1
vote
1 answer

App crashes when selecting an item in a DataGridView combobox cell if the app is open on an external monitor

I have an app that I wrote a few years ago using Winforms and C# and recently I encountered a weird bug. When selecting an item from a datagridview combobox cell the app is crashing with the error "System.OutOfMemoryException: To many items in…
Shachar
  • 21
  • 4
1
vote
1 answer

Call and add item into Comboboxes that are new in datagridview

In my program I have some combobox with variable number(depends on user choice) in first two rows of a datagrid view. Now I want to add item and work with them in other classes but I don't have access to them because I don't know how to call them…
1
vote
0 answers

DataGridViewComboBoxCell Readonly but set my combobox to default value instead of making it disable

I have a DGV that have a ComboBoxColumn, the data in the combobox is from a data table. Also this dataGridview has a button and the button will be disable depend on the value of the comboBox. If Combobox Value = Tree a showdialog will show and if…
1
vote
1 answer

Get the ID of selected item in Datagridview comboBox and show a form depend on Selectedvalue

Get the ID of selected ID in combobox and then show a form depending on the value of ID. I have a DataGridView with a few columns in it and a combo box. I am using two data tables for this. dgv 1 is for the Data in the dgv and the other one is the…
1
vote
0 answers

DataGridView CurrentRow Index was nothing error on vb.net

In my DataGridView there are 3 columns which are Textbox, Textbox and Combobox. I'm trying to add values to that row's combobox. But i can't find the current row because it returns me an error and says it's null. I don't how to handle this. Public…
user8666372
1
vote
1 answer

DataGridViewComboBoxCell show row value as default

im want put a DataGridViewComboBoxCell in a specific column for any rows i have in my DataGridView. Now i have a problem... I would like to show a default value in that specific columns where i had put a DataGridViewComboBoxCell, but there is…
Brainfail
  • 196
  • 1
  • 2
  • 11
1
vote
2 answers

How to Differentiate DataGridViewComboBoxColumn Cell Click Events

I have a DataGridViewComboBoxColumn that triggers an event on cell click, which ends up displaying a Dialog Box. This works great, but my problem is that I want this to only trigger if the user did NOT click on the arrow to display the dropdown.…
Carl Shiles
  • 434
  • 3
  • 15
1
vote
1 answer

Filter foreign keys in DataGridView

I am using C# and DataGridView WinForms, binding to a DataTable. My DataGridView contains the following columns: MaterialId (read-only foreign key displaying material title) PricelistId (DataGridViewComboBoxCell with selectable foreign key) Each…
Alex
  • 173
  • 2
  • 8
1
vote
1 answer

DataGridViewComboBoxCell won't drop

I'm using vb.NET in Visual Studio 2010. I found an example of how to add a ComboBox to a DataGridView cell, and I added it to my code. When I run the code, and I add a new row, the ComboBox is visible, but it has no value displayed in it and it…
jcvamp
  • 25
  • 8
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

Making DataGridViewComboBoxCell control drop down on first click when DataGridView does not have focus

I have seen a lot of questions similar to this but nothing that addresses my issue. I have a panel in a windows VB.Net application that has a hierarchy of visible controls, one of which is a DataViewGrid control that may contain a…
Obi Wan
  • 969
  • 11
  • 26
1
vote
1 answer

Show DataGridViewComboBoxColumn in 3d Style

I was planning to make the DataGridViewComboboxCell to display similar to a 3D Fixed Style of a textbox. I manage to do it with a Combobox using this code: public Form1() { cmbbox.DrawMode = DrawMode.OwnerDrawFixed; …