tagged [combobox]

Is there a simple way to implement a Checked Combobox in WinForms

Is there a simple way to implement a Checked Combobox in WinForms Does anyone know of a simple implementation of a checked combobox in WinForms? I haven't been able to find anything when googling. I w...

11 Jan at 16:15

Get the value for a listbox item by index

Get the value for a listbox item by index This must be very easy but I am stuck. I have a listBox with X Items. Each Item has a text description (Which appears in the listBox) and its value(numerical)...

16 Nov at 02:14

How to populate c# windows forms combobox?

How to populate c# windows forms combobox? How can I fill a combobox from sql database ( students table with id, and name columns ) , the display text represents the name of a student and the value of...

4 Jul at 01:16

Clear ComboBox selected text

Clear ComboBox selected text I have a `ComboBox` control with the `DropDownStyle` properties set to `DropDownList`. Once there is an item selected, how can I clear the selection from the `ComboBox` wi...

7 Oct at 06:29

Set SelectedItem on a combobox bound to datasource

Set SelectedItem on a combobox bound to datasource Now how do I set the combobox's Item to something other than the first in the list? Tried

Check if a ComboBox Contains Item

Check if a ComboBox Contains Item I have this: If I use or it returns `False`. Can anyone tell me how do I che

10 Aug at 15:16

Align Text in Combobox

Align Text in Combobox I want to align my text in combo box so that it will show in the center of combobox tell me how to do this also you can see there is a default border around a combo box when it ...

WPF Databinding combobox to a list<string>

WPF Databinding combobox to a list I am having a difficult time trying to bind my property which is of type List to my combobox through XAML. The following XAML binding does not work: But the followin...

9 Aug at 15:54

Professional jQuery based Combobox control?

Professional jQuery based Combobox control? Are there any Combobox controls (dropdown list with autosuggestion) based on the jQuery library? It should be able to handle and have some options. A would ...

28 Aug at 15:2

How do I set the selected item in a comboBox to match my string using C#?

How do I set the selected item in a comboBox to match my string using C#? I have a string "test1" and my comboBox contains `test1`, `test2`, and `test3`. How do I set the selected item to "test1"? Tha...

1 Jul at 19:13

How do I detect if no selected item on ComboBox is chosen?

How do I detect if no selected item on ComboBox is chosen? In my ComboBox, the field is blank before users click it and choose any item. So without users click on the ComboBox, it remains empty. How d...

5 Sep at 11:58

How to make the ComboBox drop down list resize itself to fit the largest item?

How to make the ComboBox drop down list resize itself to fit the largest item? I've got a `DataGridView` with a `ComboBox` in it that might contain some pretty large strings. Is there a way to have th...

how to check if item is selected from a comboBox in C#

how to check if item is selected from a comboBox in C# I'm pretty new here. I have a form, and want to check if the user filled it in correctly. In the form there's a combo box; how can I build the "i...

3 Oct at 07:21

Binding Combobox Using Dictionary as the Datasource

Binding Combobox Using Dictionary as the Datasource I'm using .NET 2.0 and I'm trying to bind a combobox's Datasource to a sorted dictionary. So the error I'm getting is "DataMember property 'Key' can...

20 Jun at 14:25

Check if combobox value is empty

Check if combobox value is empty I have created a ComboBox with three values. I wanted that a message box opens when no item is selected so I tried this: That works fine but only if I click into the f...

6 Nov at 07:16

Refresh ComboBox Items, easiest way

Refresh ComboBox Items, easiest way I've googled a lot. Found a lot as well. Unfortunately nothing is straight, easy and most importantly, simple. I want some guy write a `method` that takes a `List` ...

15 Jul at 12:4

Readonly ComboBox in WinForms

Readonly ComboBox in WinForms I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided optio...

2 Oct at 15:18

ComboBox: Adding Text and Value to an Item (no Binding Source)

ComboBox: Adding Text and Value to an Item (no Binding Source) In C# WinApp, how can I add both Text and Value to the items of my ComboBox? I did a search and usually the answers are using "Binding to...

16 Aug at 18:38

C# WPF Combobox select first item

C# WPF Combobox select first item Goodday, I want my combobox to select the first item in it. I am using C# and WPF. I read the data from a DataSet. To fill the combobox: Combo box XAML code: ```

15 May at 17:37

WPF Combobox DefaultValue (Please Select)

WPF Combobox DefaultValue (Please Select) Hi I have a WPF Combobox which shows a list of Enums. Code is below. However, when the view is loaded, it shows the first enum in the lis

17 Apr at 10:31

How to bind a List to a ComboBox?

How to bind a List to a ComboBox? I want to connect a `BindingSource` to a list of class objects and then objects value to a ComboBox. Can anyone suggest how to do it? is my class and I want to bind i...

14 Dec at 00:59

Bind UWP ComboBox ItemsSource to Enum

Bind UWP ComboBox ItemsSource to Enum It's possible to use the `ObjectDataProvider` in a WPF application to bind an enum's string values to a ComboBox's ItemsSource, as evidenced in [this question](ht...

23 May at 12:10

How to prevent/cancel a combobox's value change in c#?

How to prevent/cancel a combobox's value change in c#? I have a combobox at the top of a form that loads editable data into fields below. If the user has made changes, but not saved, and tries to sele...

5 Jul at 14:27

What event catches a change of value in a combobox in a DataGridViewCell?

What event catches a change of value in a combobox in a DataGridViewCell? I want to handle the event when a value is changed in a `ComboBox` in a `DataGridView` cell. There's the `CellValueChanged` ev...

How to add items to a combobox in a form in excel VBA?

How to add items to a combobox in a form in excel VBA? I am new to VBA. I want to create a form where a user selects an item of a combobox and the selection runs a macro.I created a user form in VBA b...

30 Jul at 18:1