combobox

Weird behavior for a property bound to the 'SelectedItem' of a WPF Combobox ...

When binding a property to the 'SelectedItem' of a WPF Combobox, I would expect to see that property setter get called every time the combobox's selection is changed. I'm not seeing that. Should the Combobox be calling the bound 'SelectedItem's property setter when the selection is changed? Addition: I actually have the binding partiall...

C# Why isn't it possible to set the selectedValue of a dynamically created combobox?

I create a combobox in a class and want to set the selected value for that combobox. But when I do that, the selectedValue stays null and when I try to set the selectedIndex I get a ArgumentOutOfRangeException. Code: public Control GenerateList(Question question) { // Clear the local givenAnswer collection _givenAnswer.Clear()...

Accessing control between DataGridCells, dynamic cascading ComboBoxes

Hello. I have a DataGrid that two of its columns are ComboBoxes (one contains few but not this is the problem). I want, that when the user changes the first Combo's value, the ComboBox in the other column should bind to a property of its (this property is a collection). Say the First ComboBox is Category, I want that when the user chan...

Clicking on iFrame does not blur Ext Combobox

I have a page with a Ext.form.ComboBox and a TinyMCE Editor, which uses an iframe for its body. The problem is that when the ComboBox has focus and the user clicks on the iframe, the ComboBox's blur event is not fired. If the user clicks back to the ComboBox, the focus event is also not fired. However, document.activeElement does change ...

How to add a row to databound combobox?

I have a combobox and I need the first row to be set as default. This is my code cbBrandForModel.DisplayMember = "BrandName"; cbBrandForModel.ValueMember = "BrandID"; cbBrandForModel.DataSource = dataTable; I need to add this: cbBrandForModel.DisplayMember = "Select Brand"; cbBrandForModel.ValueMember = "0"; Can anyone tell me...

Problem with data binding (Using the MVVM pattern) to a WPF Combobox within a DataGrid's RowDetailsTemplate ...

I'm trying to bind a view model property to the 'SelectedItem' attribute of a WPF combobox. This combobox resides within a RowDetailsTemplate of a DataGrid. The binding is partially there because the view model's property getter and setter each get called once when a row is selected (And thus causes the details view to expand). However t...

How to change the Combobox.Text property when Combobox is bound to data?

My scenerio is like this: At runtime, I bind ToolStripComboBox to array of struct: cbxTimes.ComboBox.DataSource = PlayTimeLengths; cbxTimes.ComboBox.DisplayMember = "Description"; cbxTimes.ComboBox.ValueMember = "Minutes"; The DropDownStyle of ToolStripCombobox is set to DropDown. Everything is working fine, I can select values from...

Auto populating text boxes on an Access 2003 form when value selected in combo box

Hello I am building a form in access database. I have a combo box which is linked to a query which is looking up a unique reference number from a table called Tbl_Submitted_Requests. What I need the form to do is auto populate the other text boxes when the user selects the unique reference from the combo box. How can I get the text bo...

Compact Framework: Context menu for ComboBox with style DropDown does not show on the edit portion of the control

I am working in .NET Compact Framework, C#, .Net 2.0, Visual Studio 2005. I have a form with several ComboBoxes, which have DropDownStyle = DropDown, so I can edit information in the controls. This form must have a ContextMenu (Cut, Copy, Paste etc). I did a menu, but there is a problem: When a ContextMenu is assigned to a ComboBox, th...

Winforms DataGrid with bound ComboBox column - How to sort by DisplayMember?

Scenario: Winforms DataGrid control in which one of the columns is a comboBox control (NB: not datagridview). The DataSource for the DataGrid is a dataView, with essentially two ID fields, lets say OrderID, CurrencyID; i show the CurrencyName in the combo and grid, but store the CurrencyID. So, the DisplayMember for the combobox is Curr...

Control in an ItemTemplate of a ComboBox loses its binding

I have a ComboBox that uses an ItemTemplate as shown below. Somehow the Text property of the text box defined in the item template gets disconnected from the binding and stops being updated when the selected item changes. The ComboBox.ItemsSource is bound to a DependencyProperty that is list of CatheterDefinition objects. The ComboBox...

Object binding to Winforms ComboBox fails when SelectedItem is null

I found a lot of posts that dodge this topic, but none that actually addresses this case. I have a ComboBox bound to a List<State>, where State is a business object that has Abbreviation and Name properties: this._stateComboBox.DataSource = ((Address)this._addressBindingSource.DataSource).States; this._stateComboBox.DisplayMember = "Ab...

Combobox and its item display problem wpf

Hi All, I am using the following code to display items in the combobox. but item is not getting displayed. Code: <ComboBox Width="100" ItemsSource="{Binding}" SelectedIndex="0" Name="cbProduct"/> List<ComboObject> combObjList = new List<ComboObject>(); combObjList.Add(new ComboObject { Text = "All", Value = "%" }); ...

WPF4 DataGridComboBoxColumn doesn't work

Look how odd is the following scenario: <DataGrid.Columns> <!--Doesn't work--> <DataGridComboBoxColumn Header="Vendor" ItemsSource="{Binding Vendors}" SelectedItemBinding="{Binding Vendor, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Contact.Title"/> <!--Works--> <DataGridTemplateColumn Header=...

Has anyone got an Infragistics WinForm Combo working with a dynamically populated data source?

I've got a simple requirement: when the user types something in a combo, my app will go out somewhere and get a list of relevant items that might match what they want. e.g. if they type 'A', it'll go out and get all books beginning with A. I initially used the standard .NET combo with a custom auto-complete data source, but that kept cr...

why does a dropdown combobox list (select html tag) disappear very quickly in IE 7 but works fine in firefox

i have a combobox and its on a narrow part of a webpage. below is my dropdown html. THe issue is that in IE 7 only (works fine in firefox) after i click on the dropdown, the list of items pops up and i go to click on an item in the list and it disappears before i get a chance to click. It seems to work fine in IE8 as well but in IE7 ...

How to insert item to combobox after binding wpf

Hi All, I want to add an item to the combobox after binding it. for example: this.cbCategory.ItemsSource = categoryList; this.cbCategory.DisplayMemberPath = "CategoryName"; this.cbCategory.SelectedValuePath = "CategoryID"; i want to add("All", "%") as the first one. Geetha. ...

How to stop a comboBox's selectedIndexChanged event from firing when the form loads

I have a form with a ComboBox that provides a dropdownlist. On the comboBox's SelectedIndexChanged event, am running some code, but i don't want that code to run when the form loads. Unfortunately, when i load the form (before i make a selection in the combobox), SelectedIndexChanged of the combobox fires ( i think when the combobox is d...

Siliverlight databound combobox doesn't display initialized value

I am databinding a view to a viewmodel and am having trouble initializing a combobox to a default value. A simplification of the class I'm using in the binding is public class LanguageDetails { public string Code { get; set; } public string Name { get; set; } public string EnglishName { get; set; } public string DisplayName {...

treeview inside selectbox using jquery

Hi Anybody have an example of treeview inside combobox using jquery or javascript ,please let me know thanks ...