combobox

MS Access ComboBox.Column - use name instead of index ?

i have ComboBox controls with multiple columns as a Row Source in an Access 2007 form. i'm currently getting the selected values out of each ComboBox item this way... value = ComboBoxName.Column(i) 'where i is the index. i would like to use the actual names of the columns as with Recordset's... value = ComboBoxName.Recordset.Fields("c...

Automatic combobox switcher in WPF

Greetings, Is there any way to create something like automatic combobox switcher in WPF? The case is that I want to add some links to combobox and these links should automatically changed after, let's say 10sek. Something like dynamic advertisements or combobox links rotator. Is there any way to achieve something like that ? EDIT: To b...

WPF ComboBox autoselecting first value if the Items collection contains only one

I have settings dialog with a number of ComboBoxes. More often than not, these ComboBoxes will only have one selectable value. So to make the dialog easier to use I want the ComboBox to autoselect the single value if, and only if, Items.Count == 1 && SelectedItem == null. I found this but dont want to add additional dependencies if I ca...

ComboBox will not update its display list unless you change selections first.

Update: I checked the answer before I fully tested it still does not work. I updated the code below so you should just be able to paste in in to a empty winforms project and it should compile. UPDATE: I have found that if I change the selected item on the ComboBox to any other item it now behaves as expected (in my code below I would sw...

ComboBox listItem alignment

Hi, I am working on C#.Net project with infragistics. My project i want to implement search options, like Microsoft office Outlook 2007 Instant search functionality. For that i am using UltraComboEditor, now i am able to design and list-out items like Microsoft office Outlook 2007 Instant search, but i am not able to split 2 column(firs...

Binding a combobox to a database and gridview

Hi, I am displaying a database table on a grid view and displaying a selected item's details in a detailsview. Here's the problem: There's a combobox in the detailsview and I want to display the added value's string on grid and I want the combobox to select this value. It will be possible to update, delete the selected item from grid o...

Data Binding in Combobox

Hi, I binded a database table's primary key to the selectedIndex of a combobox. the problem occurs where the primary key starts from 1 but selectedIndex accepts from 0. I mean, when I want to see the item with ID=1 in database, since it's listed as first element in combobox with index 0, it displays the second element in the list, which ...

ListItem add to comboBox

Hi, I am working on C#.Net project with Infragistics. My project I want to implement search options, like Microsoft office Outlook 2007 Instant Search functionality. For that I am using UltraComboEditor. In UltraComboEditor I have added 3 ValueListItems (Search all screen, search current screen, search options). I want to add one more i...

C# How to set default value of a string collection in Design

In WinForm, I have a combobox with DropDownStyle set to DropDownList (so can't enter a Text). In the properties window, there is the Items property which is a string collection. I enter all my values. But now, I would like to set one of these value by default (instead to have the empty entry at run-time). I know how to do this via codin...

gtk treeviewcolumn with differend combo model for each row

I have a global set of values, e.g. ["Foo", "Bar", "Baz", "Quux"]. Each row in my TreeView represents an entity that can only deal with a subset of these values. For example, the first row might deal with "Foo" and "Bar", and the second, "Bar" and "Quux". I want a ComboBox column to allow each row to select one of the values it can deal ...

JComboBox and vetoableChange?

When a user changes the value in a JComboBox, I want to prompt them to confirm the change. If they say "no," the old value will remain. If they say "yes," the new value will be selected. I tried adding a VetoableChangeListener to the combobox, but this does not ever seem to be fired! Per the JavaDoc for JComponent.addVetoableList...

C# winForm Basics Combobox

hey all, i've built a ComboBox that gets manually items like this: var newitem = new { fullname =c.Company+" "+ c.FirstName + " " + c.LastName, custId = c.CustomerID }; c_dropCustomers.Items.Add(newitem); later on on combo Selection event, i would want to get out the custId (The Value) only but i dont know how to ...

Grouping items in a combobox

I have a listview that contains two types of objects, single and multiple. The single is a ordinary textblock while the multiple is a combobox with items. I'm trying to group the items in the combobox without success. Is it possible? Or should i go for a different approach? What i'm trying to achieve: [Combobox v] [Header ] [...

MS-Access unbound ComboBox in DataSheet?

In ms-access 2007, i'm trying to make a form for a table. this table has foreign keys from 2 parent tables. so i thought i would make these fields a lookup. but i couldn't create a single lookup for each parent table because they are composite keys. I decided to create a query in which for each of these parent tables and the child table...

wpf datagrid - binding a custom column

I have a datagrid with 4 columns. Build Defintion, command, arguments, and a delete button. I am building a ObservableCollection of a class called monitor which is the dynamicresource for the datagrid. The monitor contains the build definition, command, and arguments. All are string types. The command and arguments are simple as they are...

WPF ComboBox Residing in a ListBox Click Event

Hi All, I have a little issue. I have a a ListBox that is bound to a list of object. These Objects have a property that can be set. I have in the LIstBox ItemTemplate (a datatemplate) a combobox that is about to the objects property and the combobox has some hardcoded values. My problem is that when the list box is displayed and I cl...

Grouping items disregards items style ( Groups show up empty )

This is basically a follow up question to my previous question found here I'm trying to group items in a combobox but my problem is that either the GroupDescription is shown or the items. If I add collectionView.GroupDescriptions.Add(new PropertyGroupDescription("Team")); then my ComboBoxItem style will be disregarded (it never gets to...

Benefit of using DBComboBox over CombBox?

So I'm messing around with a new project in Delphi 2009 and the default components that can be dropped onto a form for accessing data consist of a SQLConnection, DataSource and SQLQuery. If I add a simple select to the query component, say: select name from customers and then drop a DBComboBox on the form and link it up with the Data...

ComboBox.DataSource assignment taking ages

I have the following code: List<string> list = SomeFunction(); this.myComboBox.DataSource = list; For some reason, the assignment to DataSource is taking a surprising amount of time (about 1.4 seconds), when the list only contains 4 items. Any idea why this is? Edit: SomeFunction() looks in several folders on disk for the existenc...

WPF Combobox current scroll position does not change

Hi, I have a public property of type ObservableCollection<ClassName> in the code behind file and i have bound this to the ItemsSource property of the Combobox. <ComboBox Height="23" Margin="82,34,71,0" Name="comboBox1" VerticalAlignment="Top" ItemsSource="{Bindi...