combobox

Combobox in a DataItemTemplate

Hi, In the AspxGridView there are two comboboxes in DataItemTemplate, manually loaded. So when user selects one field of the first combo second will be disabled, i wrote this: <dxe:ASPxComboBox ID="cmbEqualNotEqual" runat="server" ClientInstanceName="cmbCEqualNotEqual" EnableClientSideAP...

Ext.form.ComboBox: Use template for displayField

Is there any way to apply a template to the selected value of a ComboBox? I'm using a template to display the drop down values of the ComboBox, but as soon as i select one, the plain value from the datastore is shown. { id: 'requestStatusCombo', hiddenName: 'requestStatus', tpl: '<tpl for="."><div c...

WPF C# - ComboBox methods return object instead of string

I'm new to WPF and I'm trying to figure out how to get the current text value of the selected item in a ComboBox. I saw in this question someone suggested doing MyComboBox.SelectedItem.Text. However, SelectedItem returns object for me, so I only have options like ToString(), Equals, etc. What's going on? I'm using .NET 3.5, developin...

WPF newbie - setting ItemsSource in XAML doesn't seem to work

I'm new to WPF and trying to figure out all this databinding stuff. When I do the following in my code, my ComboBox is populated when I run my application: public NewForm() { InitializeComponent(); Product.ItemsSource = Products; } public List<string> Products { get { return _productsComponents.Keys.ToList(); } } However...

Add nothing selected as default in a .net comboBox

Hi, I am working in C# with Visual Studio 2008. I am trying to create a comboBox for a simple search form in a windows application. What I want to do is have a comboBox with some options from a table in my database so I bound a table to it and selected the columns to display. What I want to do is add a default blank value(to represent ...

Events in cascading combo boxes

I have created a WinForms user control that is a set of five cascading combo boxes - the user selects something from the top combo which then populates and enables the second combo, and so on. If there is only one option in the newly enabled combo I automatically select it, causing the one below it to become active. Consequently a single...

In flex, how to associate value to String under Combo Box?

How can I give value to combo box entries. For example, in combo box, I have Array Collection and inside it, I am adding strings like mx:String. I want to give it different value than the text. How can I do it? ...

Set SelectedItem of WPF ComboBox

<ComboBox Grid.Row="1" Grid.Column="0" Width="Auto" Margin="4,0,8,0" VerticalAlignment="Top" Name="cmbBudgetYear"> <ComboBoxItem Content="2009" /> <ComboBoxItem Content="2010" /> <ComboBoxItem Content="2011" /> <ComboBoxItem Content="2012" /> </ComboB...

WPF, linking together two XML data sources in cascading ComboBoxes

I have XML in the following format: <Products> <Product name="MyProduct1"> <Components> <Component name="MyComponent1"> <Teams> <Team id="1"/> <Team id="4"/> </Teams> </Component> </Components> </Product> </Products> This is stored in an external XML file that is included via...

WPF: Change background on some combobox items

I'm trying to change the background of certain items in a combobox that meet a condition <ComboBox ItemsSource="{Binding Path=Model.Names, Mode=OneWay}" SelectedValue="{Binding Path=SelectedCompanyName}" DisplayMemberPath="Alias" /> The thing is that "Alias" is saved in two different places (in company and in order) and if they dont m...

How to make a ToolStripComboBox look like a regular ComboBox

I am dynamically adding a ToolStripComboBox, and I need it to look like a regular combo box. The tool strip version has the editable field and looks completely different. Is there a property (or multiple properties) I need to set to make it look and feel like the default combo box? ...

Using the selected index of a combobox in an If statement of a different form.

I'm trying to reference the selected index of a combobox on my mainform in an if statement inside a method on a second form. Some google searching has confused me a bit. The most obvious answer I can see is just making the combobox control on the mainform public, however the websites I've been reading seem to indicate that this is not th...

WPF, getting value of TextBlock inside ComboBox DataTemplate

I have the following XAML: <ComboBox Height="23" HorizontalAlignment="Left" Grid.Row="6" Grid.Column="2" Name="cbo_team" VerticalAlignment="Top" Width="148" DataContext="{Binding ElementName=cbo_component, Path=SelectedItem}" SelectedIndex="0"> <ComboBox.ItemsSource> <Binding XPath="Teams/Team/@...

How to create combobox with images in Gtk ?

Hi ! Can anyone please tell me how to create a combobox like following with Gtk (on Linux)? (I already ask this question for win32 API). A code example or tutorial will be very helpful. I have tried searching this over the internet, but unfortunately documentations/tutorials aren't that much rich for Gtk. Thank you very much. Rega...

WPF Combobox SelectedItem hell

Im having a very funny issue in WPF Im creating a Combobox through code, and adding it to a control. When I set the Combobox.SelectedItem or Combobox.SelectedIndex or Combobox.SelectedValue I am unable to select another option from the Combox items. ForeignKeyDisplayAttribute attribute = (ForeignKeyDisplayAttribute)this.GetAttribute(t...

combobox in datagrid cellrenderer

Hi all... searched looooong and hard for this without luck: I need to put a combobox in a column of a datagrid. The user just need to select a value from the existing combox items. I know I need to use a custom cellrenderer. Please see my current attempt below. This attempt successfully inserts a combobox into the datagrid, BUT without ...

How to populate struts2 combo with string array

statesList is ArrayList that contains String object. String[] states = new String[2]; states[0] = "CA"; states[1] = "California"; statesList.add(states); //--- <s:select list="statesList" headerKey="" headerValue="Select State" name="state" listKey="?" listValue="?" /> What to mention in listKey and listValue?? ...

Smartphone win Application 's combobox load problem ...

Am working on smartphone application. Here I have a combobox which loads when the value of another combo gets changed. private void cmbTreatmentType_SelectedIndexChanged(object sender, EventArgs e) { MasterData lData = new MasterData(); cmbTreatmentCategory.DataSource = lData.GetTreatmentCategories((int)cmbTreatmentType.Select...

How to 'get at' the WPF combobox PART_EditableTextbox because combobox not getting highlighted?

Hi, My WPF combobox is populated with a different set of strings each click of a button. There are other controls on the window as well. The combobox is the 'first' (top) in the window, but the text doesn't get highlighted. When the user tabs through the controls, the text DOES get highlighted, but when it's the first on the window, it ...

Winforms Databound ComboBox doesn't update when close Window

I have a combobox that is databound and updates with no issues. The problem I have is if the user types something into the combobox and then uses the [X] close button in the window without tabbing out, the data is not updated. I've been looking all over the web, but can't find any relevant help/tips. The only idea is have is to force an ...