combobox

WPF: Binding Combobox in Code Behind to Property

Hi All, This might be something very straight forward and I really think it should work as is, but it doesn't... I have the following scenario: var itemSource = new Binding { Path = new PropertyPath("ItemList"), Mode = BindingMode.OneTime }; comboBox.SetBinding(ItemsControl.ItemsSourceProperty, itemSource); ItemList ...

WPF - styling comboboxes

Hi, I'm trying to style Comboboxes in WPF so that they are white, and have the same border as TextBoxes. I have the following style so far, but don't know how to set the border: <Style TargetType="ComboBox"> <Setter Property="Margin" Value="0,2,0,2" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property=...

how to set flex combobox cursor position

I have a combobox implementation as follows - Based on user input (min 2 chars) in the editable combobox, the data provider is refreshed and drop-down opened, showing different data sets as user input varies. Problem is that after drop-down opens, the cursor moves back to the beginning. So for instance, the user types in "ab", and want...

WPF Combobox in Gridview's column

I got a combobox in the grid's column: <ListView> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox /> </DataTemplate> ...

WPF Combobox textbox not updating when binding changes.

I have a WPF CombBox as follows: <ComboBox ItemsSource="{Binding Source={StaticResource myList}}" SelectedItem="{Binding Path=mySelectedItem}" /> The problem I have is that when the bound value changes, the selected value in the combobox's textbox does not update. (Note - the values in the combobox list do update). I am using ...

Combobox drops up in IE 8 and it works correctly in IE 6

Hi, I have a simple select/combo box with 100 options in the middle of a HTML page. When I open it in IE 6 it appears fine dropping down with a few elements displayed and a vertical scroll bar. In IE 8, it opens upward. Looks like it drops down till it reaches edge of browser screen when it has few options and then opens upward for new...

Create UserControl DependencyProperty of which value can be chosen in dropdown list (as combo box)

Hello everybody, I'm a starter at WPF, now i would like to make a WPF userControl library which include a Rating bar userControl. All the steps of creating the rating Bar has been done, however i would like to add a property RatingValue: public static readonly DependencyProperty RatingValueProperty = DependencyProperty.Regi...

How to set TextSearch.Text for a combobox whose TextBlock uses converter?

In the below code, Combobox is wired to NameInfo object along with a converter.NameInfoConverter returns a format in which items in combobox are shown in a particular format (for eg: LastName, FirstName (Badge#) ) Now, when I set TextSearch.Text="{Binding NameInfo, Converter={StaticResource NameInfoConverter}, ConverterParameter=true}" ...

Windows Forms mobile application: DataGrid with ComboBox column

Hi folks, I'm working on a Windows Mobile 5 application - C# .NET 3.5. Are you aware of some approach to having a ComboBox column within a DataGrid ? The user must be able to select certain values on certain rows. Thanks. ...

How to use Combo Box AddRange in WPF C#

Hi everyone, I have a little problem, I have an array and I want to add that in a Combobox, so I want to use the AddRange method, but it isn't available in WPF, is there a way that I can do it in the combobox? Thanks. ...

How do I display an input form when a user selects "other" from a combo box in MS Access?

This is basically the same question as "Click items in select box, and then display a text input." Except I am using MS Access. I want to display a text input field on a form when the user selects "other" from a combo box on the same form. How do I do this? ...

WPF ComboBox Binding

Hi So I have the following model: public class Person { public String FirstName { get; set; } public String LastName { get; set; } public String Address { get; set; } public String EMail { get; set; } public String Phone { get; set; } } public class Order { public Person Pers { get; set;} public Product Prod { get; s...

how to setup values for combobox in vb.net

I want to setup values for a combobox in vb.net through code. But I don't know what's the code for setting it up. please help. I want to do something like this: if combobox1.selecteditem="1" then combobox2.values=("x", "y", "z") end if ...

refresh sub category combo box in php ?

Hello i need to refresh combo box (sub category ) related to what i choose in main category combo box , for example if i choose "chicken" in main category , the value of sub category will be "grilled chicken" , " fried chicken " ? how should i do this ? <select name="categorylist" id="categorylist"> <? $sql_query= mysql_que...

How to store an ItemsSource for an ItemsControl (ListBox, ComboBox) in the app.config?

After much research and trial and error I found how to store the items for a ListBox and ComboBox in the app.Config. I am heavily indebted to Jon Rista, who wrote a series of articles about the Net 2.0 Configuration classes. I constructed a (large!) code snippet that will generate all the code you need by just inserting three strings! En...

Wpf Combobox in Master/Detail MVVM

I have MVVM master /details like this: <Window.Resources> <DataTemplate DataType="{x:Type model:EveryDay}"> <views:EveryDayView/> </DataTemplate> <DataTemplate DataType="{x:Type model:EveryMonth}"> <views:EveryMonthView/> </DataTemplate> </Window.Resources> <Grid> <ListBox Margin="12,24,0,35" Name="schedules" ...

Winforms ComboBox does not expand when clicked, any ideas?

Hi everybody, A ComboBox within a Form (modal dialog) does not open when clicked, however an item can be selected by using the up/down arrow keys. After clicking on another window and the back on the dialog, the ComboBox works as expected, i.e. expands on click. Weird... any ideas what could be causing this behavior? Thanks a lot in ad...

Using Linq to filter a ComboBox.DataSource ?

Hi board, in another topic, I've stumbled over this very elegant solution by Darin Dimitrov to filter the DataSource of one ComboBox with the selection of another ComboBox: how to filter combobox in combobox using c# combo2.DataSource = ((IEnumerable<string>)c.DataSource) .Where(x => x == (string)combo1.SelectedValue); I would like t...

How to read from path in wpf comboboxitem and write into path of binding

Hi, I tried to make up an example to show my problem. My combobox has a list of objects as itemssource. In my example it's a list of Persons. In the combobox i want to show the first name and the last name of the person. But i want to save the last name of the person in the "owner" property of the house-object. My guess was that i bi...

Combobox in WPF loses its theme when using a style trigger. (Stumper?)

I am using style triggers to change combo box to texbox if it's readonly, but for some reason when I apply the style, it cause the combobox theme to change from Aero to Windows Classic (the theme I currently have in use on my PC). Any help would be GREATLY appreciated! Here is my code: <ComboBox ItemsSource="{Binding Source={StaticRe...