combobox

Dynamic filter of WPF combobox based on text input

I cant seem to find a direct method for implementing filtering of text input into a list of items in a WPF combobox. By setting IsTextSearchEnabled to true, the comboBox dropdown will jump to whatever the first matching item is. What I need is for the list to be filtered to whatever matches the text string (e.g. If I focus on my combobo...

Setting WPf Datagrid Combobox value to its respective textbox

I am having a textbox and a combobox as a template column. Below is XAML <wpfkit:DataGrid Margin="3" Style="{DynamicResource SimpleDataGrid}" FontWeight="Normal" MaxHeight="100" CanUserAddRows="True" ItemsSource="{Binding Source={StaticResource odpExistingGHSCodesColl}}" AutoGenerateColumns="False" Name="dgGHS" VerticalScrollBarVi...

XAML/WPF: How do I bind a command to a comboboxitem.

I want to bind a command to a comboboxitem much like a typical command (either application or custom) is bound to a button. I can't seem to find an example. EDIT: The ComboBoxItem exists as part of a ContentControl that also contains a button. The button has an associated command that works well. How can I bind a command, in a simil...

TabControl in ComboBox

I would like to create an ImagePicker control that lets users pick an image from a variety of sources. A picture is worth a thousand words: I'm not yet cool enough to post images <ComboBox> <local:GoogleImage/> <local:GoogleImage/> <local:GoogleImage/> <local:BingImage/> <local:BingImage/> </ComboBox> Basically, I...

C#/Linq combobox databinding

I'm working on a project where I'm using DataBindings to update certain fields based on currently selected field. I have a series of textBoxes which are databound to a combo box, which at present is currently linked to a table as a data source. However there is a relationship between the ID of two tables, meaning the combobox should be l...

C# Databinding SelectedIndexChanged call

I am using a SelectedIndexChanged function for a combobox to update the content of my DataGridview item. I have the combobox data bound to keep track of it's currently selected record. However, when I changed the combobox index it updates the datagridview as if the selected value was the same. This means once I have selected a different ...

c# databinding combobox change fields

I have databound a DataTable to a combobox, and I have a textbox that is also linked to a field in this same table. The Date field updates as expected when switched between records, but changing the value of the Date field causes the list entry in the combobox to change to System.Data.DataRowView. The record still selects fine. Here is ...

What is the most efficient way to place a list of drives in a ComboBox using C#?

I am creating a program that allows the user to select a drive letter from a combo box. I am debating between populating the box using a list or an array. What is the best and most efficient way to do this? ...

ComboBox goes blank after data bound update, even though data updates successfully

Hello, I've got a problem with getting a ComboBox to operate as expected when data bound, and I am not sure where the problem is. In the code below, a ComboBox is created and given a data bound list of values, and is then data bound to the form. The idea is that the ComboBox should display the list of options, and when one is selected...

Save Value and text in Combobox

hi i have a combobox in c# winform. i have to save two things against each elemet. a Text which will be displayed to user and a id against that text. in Asp.Net we can save these values in Text and Value fields of listbox.. but how to handle this situation in winform app ...

.NET Is it possible to have a contextmenu on an item of a combobox?

In my application I have dropdown list with several items. I'd like to show a context menu when the user clicks the right mouse button on a dropdown item. Is this possible? And if it is possible, how? ...

Databinding a list (in an object) to a combobox in VB.net

VB 2008 .NET 3.5 I have a custom "Shipment" object that contains a list of "ShippingRate" objects. This list of "ShippingRates" is accessible through a property "Shipment.PossibleShippingRates." That property simply returns a copy of the list of "ShippingRate" for that particular Shipment. My UI layer receives a list of "Shipment" o...

Default Combo Box Value From Another Combo Box

The Situation I have a form (frmDETAILED) with three fields: cboDESCRIPTION, cboCONCEPT and cboSUBCONCEPT. Now, cboDESCRIPTION look at tblDESCRIPTIONS. Also tblDESCRIPTIONS have the defaults values for cboCONCEPT and cboSUBCONCEPT; but cboCONCEPTS and cboSUBCONCEPTS fields get their values from tblCONCEPTS and tblSUBCONCEPTS. My Pro...

ms access combo box refresh

i have 3 tables chapters (id, name) heading (id, name, parentid) subheading (id, name, parentid) the parents are the ids of the tables above each other. i have a form with 3 combo boxes chapter heading subheading. i have vba for the onchange for chapter and heading. This code works fine: Private Sub Chapter_AfterUpdate() Me.Headin...

Odd Binding behavior in WPF

Hello, I will try and explain this as concise as possible. I have 2 objects, the first which we will call object A that has an Id property and the second we will call object B, which has a ParentId property. The obvious relationship is that object B's ParentId is set to an object A's Id property. I am using the MVVM pattern, so on the vi...

combobox nested in datagrid from an external button click

I am going crazy trying to get a combobox value inside a datagrid by pressing a button external to the datagrid. here is the code: mxml left="243" top="0" title="Voting" hideEffect="{fadeOut}" showEffect="{fadeIn}" > ...

actionPerformed comboBox in a JTable

I have a table (JTable) that has a comboBox in one of it columns. Say the combobox is consist of id. So, whenever user choose from comboBox (in a selected row), the next column in the table will display the name of the id (in the same selected row). I tried this code: cboItem.addActionListener(new java.awt.event.ActionListener() ...

How to create an insert Form with TextInput containing ComboBox provided by mySQL Database Table

I have a Flex application which manage a database composed by 7 tables. I have created the insert form and all work great. Now I wanto to improve the Form performances; the idea is to replace the TextInput of the Form with ComboBoxes which are provided by the DataBase tables. Any ideas? Thanks in Advance ...

WPF Virtualizing Combobox

I have a combobox created in code with 30,000 items in WPF, and it was truly slow - probably rendering all the rows. I did this to fix it: cboValue = System.Windows.Markup.XamlReader.Parse("<ComboBox xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""&gt;&lt;ComboBox.ItemsPanel&gt;&lt;ItemsPanelTemplate&gt;&lt;Virtualizi...

bindingsource doesn't save some fields

I have an invoice form bind to a bindingsource and bindingnavigator. I use the bindingnavigator to add and save records. But I can's save data from an item combobox and total text box. The item combobox's datasource is set from the item table. It's value member is set to item id and its display member to item name. but when i hit save, t...