combobox

Name Value Pairs in a ComboBox

I'm convinced this must be a common problem, but I can't seem to find a simple solution... I want to use a combobox control with name value pairs as the items. ComboBox takes TStrings as its items so that should be fine. Unfortunately the drawing method on a combobox draws Items[i] so you get Name=Value in the box. I'd like the value ...

Insert a default row into a combobox that is bound to a datatable?

On a winform there is a combobox that derives its information from a datatable. The datatable draws from a database list. this.cboList.DataSource = pullData(); this.cboList.DisplayMember = "fieldA"; Once the DataSource is set I am not able to insert a default row (ie *) as the first item in the combobox. I tried this: this.cboLis...

Help binding combobox within dataform to view model property outside dataform's context

I have two properties in my view model: //Relationship has property ReasonForEndingId private Relationship editRelationship; public Relationship EditRelationship { get { return editRelationship; } set { if (editRelationship != value) { ...

WPF: ComboBox SelectedIndex = -1 ??

Hello, I am using a MVVM Wizard with several pages. When I set a value in the combobox and go to the next page and switch back I want to reset the value I set before. But all whats happening is that the combobox is empty at top and the index is -1 ? What do I wrong? <ComboBox ItemsSource="{Binding Path=LessonNumbers}" SelectedIndex="...

Adobe Flex Combobox as itemrenderer

I have a flex combobox as a datagrid itemEditor. However, after selecting an item in the combobox, its necessary to click out of the combo (i.e. into another cell or elsewhere in the app) for the value to be committed to the combo. Prior to this, the combo sits 'proud' of the datagrid and the value hasnt actually been committed. Is the...

How to insert item which type is QString to a ComboBox in Qt?

I have an item which type is QString: for example: QString name="Name" the question is: How can I put this name variable into a combobox? I've read the Qt 4.6.2 docs but still cant figure out how to do that. Please dont refer me back to that Qt 4.6.2 docs again.. Please help me ASAP!! this is really urgent! thank you very much!! :) ...

change combobox selection based on value in an object in flex

how do i change the item selected in a combobox selection based on a selection of a datagrid object? ...

How can I create an editable combo box in HTML/Javascript?

I need to let users select an item from a dropdown list, but also allow them to instead enter any text, even if it doesn't match an item in the list. How can I achieve this on a web page with HTML and Javascript? The select field doesn't let users enter text, and the input text field doesn't show the preferred alternatives. All items m...

How can I create a silverlight combobox that drops down a treeview?

I'm trying to create a user control that is a combobox that, when opened, presents a treeview of heirarchal data. I created the user control and replaced a portion of the template in Popup with: <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="1"> <sdk:TreeView x:Name="Tree"> </sdk:TreeView> <...

Binding Combobox to XML (wpf)

<EssenceList> <Essence GUID="464"> <Properties> <Property Name="Name"> <value>mt-1232-1. (1-1-3)</value> </Property> </Properties> <Characteristics> <Characteristic GUID="78"> <value>gadget</value> </Characteristic> <Characteristic GUID="79"> <value>measures</value> ...

combobox in Flex

I have combo-box; <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <fx:Script> <![CDATA[ public var cbSelected:String; ]]> </fx:Script> <mx:ComboBox id="CustomBox" upd...

Combobox Like iPhone Picker

I am developing a website in HTML and PHP. Now I wants to have the look and feel of the combobox like we have it in the iPhone picker control i.e. the selected item will always be at the middle with no vertical scroll bar. I need to have it like it appears in the iPhone. Please help me. Looking for your help Joy ...

how to set combobox read only or user cannot write in a combo box only can select the given items?

i am facing a problem in setting the combo property such that only user can select the values form given items but cannot write in the combo box, how can i do so in c#? thanx in advance. ...

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 a source".. but in my case I do not have that source ready in my program... how can I do something like this: combo1.Item[1] = "DisplayText"; combo1.Item[1].Value = "useful Value" ...

WinForms ComboBox DropDown and Autocomplete window both appear

I've got a combobox on a winforms app with this code: comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; DataTable t = new DataTable(); t.Columns.Add("ID", typeof(int)); t.Columns.Add("Display", typeof(string)); for (...

jQuery combobox with nested option values?

I'm trying to create a combobox with a set of nested option values, using flyouts for the sub-values. jQuery UI Autocomplete seems to be the way to go for a flat list of options, but how can I use it with nested options? If there's a better plugin to use, I'm open to it. ...

WPF: How do I have to setup my model and the binding strategy ?

Regard this image: The TimeTableViewModel of this user interface is this: public string SchoolclassCodeMonday {get;set;} public string SchoolclassCodeTuesday {get;set;} public string SchoolclassCodeWednesday {get;set;} public string SchoolclassCodeThursday {get;set;} public string SchoolclassCodeFriday {get;set;} public string Schoolc...

How to update a database after a DataGridComboBoxColumn has changed?

hi, I have a wpf datagrid that is bound to one dataset and has two combobox columns that take their values form the main dataset and has options from two different databases, in every other cell (which are regular textbox cells) once editing is finished the database is updated through an dataset.DataTable.RowChanged event, the problem is...

How can I set the SelectedIndex in a ComboBox having element binding?

Hi, I have two ComboBoxes, one for Organisation and one for Region. When selecting Organisation I want the Region combobox to update itself with the related regions. After selecting Organisation and Region I can type in a Site to a textbox and store it to db (ADD mode). I've completed that with this code: <ComboBox x:Name="cbOrganisatio...

Binding ComboBox Item with a text property of different DataContext

Hi Everyone, I have a comboBox as below. What I want is to bind the selectedItem value to a Text property of a datacontext so that another DataTemplate can show the Image. Please note that the Combobox and Target Image elements are on two different DataTemplates so that's why I need to update the Text Property (ImageName) ofDataContext a...