combobox

ComboBox template problems in WPF

I have a listview with a DataTemplate that has a ComboBox. I want the ComboBox to look flat like a label until the user actually wants to change the value. I had the example below working before, but I changed things around a bit, and now it doesn't work anymore and I'm not sure why. The IsMouseOver property does not seem to be working...

What is the fastest way to fill a combobox in C#?

What is the fastest way to fill ComboBox in C#? With Add() Bind the ComboBox to Dataset Or there is a faster way ? Thanks. ...

Changing the color of ComboBox's highlighter in C#

Hey. I have a problem with the highlighter in ComboBox. Recently I had to gray out certain items in a ComboBox and I did that by manually (programitically) drawing strings in the ComboBox. In a .NET combobox under the DrawMode.NORMAL, the lighlighter will automatically come when you click the arrow and the backcolor of the highlighter wi...

Combobox KeyDown event handler firing multiple times

In VB.NET, I have a Combobox on a WinForm form. The form allows the user to type in a query to be searched. When the user hits the Enter key, a query is performed against the database and the results are returned as a DataTable. The DataTable is then bound to the Combobox and the user can select the option that they are looking for. ...

How do I implement Advanced combobox in CakePHP

Hi, I have implemented combobox in cakephp using following statement - echo $form->select('brand_id',array($brands),null,array(),'Choose Brand'); for brand and input form for category - echo $form->input('category_id',array('type'=>'select',$categories,'empty'=>'Choose Category')); but none of above option allows me to add my te...

.NET Designtime Datasource (for Combobox)

Hi, i'm trying to create a ObjectDataSource which I can use to bind to a BindingSource which on his turn should be bound to a ComboBox. I've created a simple class and a simple list for this class (see below) The Times list class is not showing up at my toolbox, so I cannot drag it to the form so I can select it as the datasource for...

How do I "blur" a selected ComboBox in .net windows forms?

When a ComboBox is clicked this causes it to be selected in the window. Is there a way to perform the equivalent of a javascript blur() ...

HELP Retrieving the url parameter from a JSON store from a EXTJS ComboBox

Hi everyone... I am having a problem retrieving the parameters from the url section of a json store for a combobox in EXTJS from my code behind page in c#. The following is the code in the store: var ColorStore = new Ext.data.JsonStore( { autoLoad: true, url: '/proxies...

Resize combobox arrow

I'm writing a touch screen .net winforms application and need a combobox with a larger dropdown arrow. Is there any way to resize the arrow, or am I looking at writing a custom control? ...

ASP.NET Combo Box value seems to change when I disable it in Javascript

I have a form in which the user can choose a component type from a combo box, and depending on that component they they may or may not be able to choose a data type from another combo box. When the user selects a component type, client-side javascript fires on the change and sets the value of the data type combo box if required and disa...

DataSource containing a null value makes ComboBox fail

I've thrown myself headfirst into C# and .Net 2.0 using Linq, and I'm having a few problems debugging some of the problems, namely the following: I have a ComboBox control (cmbObjects) I want to populate with a set of objects retrieved using Linq. I've written a helper method to populate a List<T> generic: class ObjectProvider { p...

getting value from other column besides the valuemember column in Infragistics ultracombo

I am fairly new to using infragistics controls (started yesterday). While they are (very) impressive they do add another layer of complexity, which I am muddeling through. So I am asking what I feel to be a fairly simple issue: I am trying to get the value from another column besides the one that is displayed in the combobox. So far all...

comboBox width depending on longest item

i've got a ComboBox that i generate dynamically and fill with some items. i would like to set this control's width to the width of the longest item. how do i count the display width of some text? edit: i'm using windows forms, but i would like to do it in asp.net as well ...

C#: DataGridView ComboBox Event Handling with a Dynamically Populated DataGridView

My Application creates a DataGrid based on XML. The XML is not optimized, but I have no control over that, so I have to "convert" it, and then add it, row by row, to the DataGrid. I have an event handler that must be fired when any of the DataGrid's ComboBoxes (all in one column) are changed. Problems: The event handling I have (in ...

Formatting text for a combobox, C#

I have three values I need to align in a dropdown box. How can I do this? I've been trying this: String.Format("{0,-30}{1,-15}{2,-10}{3,-8}", new object[] { cusJob, service, username, time }); But that leaves it uneven because it's not a monospaced font. I don't really want to use a monospaced font and I've seen applications align it b...

Extend System.Windows.Forms.ComboBox

I would like to extend the System.Windows.Forms.ComboBox control with a ReadOnly property, which would display the selected item’s text (similar to a label) when ReadOnly = true. (I do not like the disabled look achieved by setting Enabled=false) How do I do this in winforms? It was really simple in ASP.NET where all I had to do was ove...

Binding and formattingEnabled...?

Hi, I have a combobox derrived class which has a SelectedLookupItem property. This returns a LookupItem object. LookupItem is a MustInherit class. I have a class that has a property whose return type is ChildLookupItem (a class derrived from LookupItem). When I set up binding to link the combo to this property, I get a FormatException "...

Setting dropdown height of a combobox in WPF

I have a combobox in WPF that I add items to at run-time (via a data binding to a List). I'd like to set the height of the dropdown box dynamically so that all (or most) of the items show. Unfortunately it seems that the height of the dropdown is set once and cannot be dynamically altered. It always seems to be the same size. Is ther...

WPF ComboBox Font Binding FileFormatException

I have a WPF Combobox that is binding to Me.fontComboFast.ItemsSource = Fonts.SystemFontFamilies <ComboBox x:Name="fontComboFast"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </ComboBox.ItemsPanel> <ComboBox.ItemTemplate> <DataTemplate> ...

Binding a ComboBox to an IList and using SelectedValue

I have a ComboBox set up as follows, where KVPList is an IList (of KeyValuePair if it matters): comboBox.DisplayMember = "Value"; comboBox.ValueMember = "Key"; comboBox.DataSource = KVPList; I then have set up a binding with SelectedValue, binding to a BindingSource (to a DataSet). For whatever reason, the combo box always turns up bl...