combobox

WPF ComboBox SelectedValue not updating from binding source.

Here's my binding source object: Public Class MyListObject Private _mylist As New ObservableCollection(Of String) Private _selectedName As String Public Sub New(ByVal nameList As List(Of String), ByVal defaultName As String) For Each name In nameList _mylist.Add(name) Next _selectedName = defaultNam...

Cakephp, change provinces combo and cities combo

Hi All I am a newbie in cakephp; I have two combos, provinces and cities with cakephp. I would like to change cities value when the province combo value changes. Here is my code <div class="cities form"> <?php $v = $ajax->remoteFunction(array('url' => '/cities/','update' => 'divcity')); print $form-> input('Province.province_id...

MouseOver highlighting style returning to default after a second (Caused by Aero?)

I'd trying to style my ComboBoxes to match the rest of the UI but I'm having problems with the IsMouseOver highlighting. It highlights with the color I specify for a second and then fades back to the default color, kind of a cool effect but not what I'm going for. Here is my style: <Style TargetType="ComboBox"> <Style.Triggers> ...

C# - Fill a combo box with a DataTable

I'm used to work with Java where large amounts of examples are available. For various reasons I had to switch to C# and trying to do the following in SharpDevelop: // Form has a menu containing a combobox added via SharpDevelop's GUI // --- Variables languages = new string[2]; languages[0] = "English"; languages[1] = "German"; DataSet ...

Good Javascript Combo Box replacement for combo boxes with tons of elements?

I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than <select id="field-component" name="field_component"> <option selected="selected">1</option><option>2</option>... </select> Is there somethin...

AccessViolationException from a combo: Attempted to read or write protected memory

Users are occassionally getting the above error when using our application (VB.Net, Winforms, using v2 of the framework). I'm not able to reproduce it. The callstack is as follows: : System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Window...

Winforms ComboBox SelectedValueChange event

How do I prevent code from executing in the SelectedValueChange event of a combobox when the combobox is being loaded for the first time? I need the code to execute when the user has selected a new value. ...

Flex - Is there a way to specify what direction a ComboBox will open?

Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in... I'm my specific case - I need it to open upwards - always. UPDATE: You can't fix this by subclassing ...

Flex custom item renderer for the displayed item in the combobox

I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label. This works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object. Is there a way to have the displayed item rendered the same way as the one in the dropdo...

How to use a different template for selected and drop down states in combo box in Silverlight?

I can't seem to set a ContentTemplate for a ComboBoxItem. There reason I'm trying to do this is I want to have 2 appearances for my data in the combo box. When the combo box is open (menu is down) I want a text box (with the name of the image) and an image control below it. When I select the item I want the combo box to just show a text ...

Enabling controls at moment of opening a form in Access

I have a form whose controls I want to enable/disable depending on the values in a ComboBox control. This ComboBox control is linked, like all the other controls in the form, to a table. Inside the ComboBox's Change event, I placed the code that enables/disables the other controls. The problem I have is that when I open the form, the ...

VB6 Combo box events

I have a form in VB6 with two combo boxes (cboCustomer and cboItemNumber). When someone selects a value from cboCustomer, I want to populate cboItemNumber with a list of item numbers relevent to the customer selected. What event does VB6 offer that I can use? I've tried _Change and _LostFocus and neither are doing what I need. I find it ...

WPF: Problem with binding values to ComboBox inside GridViewColumn

My Views dataContext is bounded to a presentationModel with two observableCollections Members. In the View I have one listView which ItemSource is bound to is the first observableCollection. In one of the LilstViews column I want to present values from the second obeservable Colletion in my presentationModel. I cant figure out how to get...

Currency formatting on ComboBox items

I have a ComboBox bound to an ObservableCollection of decimals. What is the correct way to apply our currency converter to the items? Edit: a) I have an existing currency converter that I must use b) .NET 3.0 Do I need to template the items? ...

WPF Binding Collection To ComboBox and Selecting an item

I've been knocking my head against this for some time now. I'm not really sure why it isn't working. I'm still pretty new to this whole WPF business. Here's my XAML for the combobox <ComboBox Width="200" SelectedValuePath="Type.FullName" SelectedItem="{Binding Path=Type}" Name="cmoBox" > </ComboBox> Here's what populates the ...

How to prevent/cancel a combobox's value change in c#?

I have a combobox at the top of a form that loads editable data into fields below. If the user has made changes, but not saved, and tries to select a different option from the combobox, I want to warn them and give them a chance to cancel or save. I am in need of a "BeforeValueChange" event with a cancelable event argument. Any advic...

Get the combobox text in C#

I filled up a combobox with the values from an Enum. Now a combobox is text right? So I'm using a getter and a setter. I'm having problems reading the text. Here's the code: public BookType type { get { return (BookType)Enum.Parse(typeof(BookType), this.typeComboBox.Text); } set { this.typeComboBox...

Best javascript combo box?

A combo box is an auto-complete text box that is also a dropdown (i.e., you can choose from a list if you prefer). "Best" means combination of: stable, look/feel, API / customizability, maturity. ...

c# databound ComboBox : InvalidArgument=Value of '1' is not valid for 'SelectedIndex'.

I'm having problems setting the SelectedIndex on a bound ComboBox (on a windows form) that I'm adding to a form at runtime and I suspect there's something odd going on. When I try this, I get the error "InvalidArgument=Value of '1' is not valid for 'SelectedIndex'." private void Form1_Load(object sender, EventArgs e) { ...

Accessing Windows Forms 2.0 combobox or AXComboBox

I have created a mutli-column combobox in VB.net 2008 using windows forms 2.0. I am having trouble accessing data once selected to use in the remainder of the form. There does not seem to be a selected event to use in conjunction with the winform 2.0 combobox. Does anyone have any experience using winforms 2.0? Also I guess a better que...