combobox

How to add empty or custom value to a bound combobox?

I am using a System.Windows.Forms.Combobox bound to Category table as search criteria. I need to have a value “All” or empty string that will be selected when user does not want to use this criteria. Since combo is bound, each time it is clicked, value added by combo1.Text = “All” is erased. Obviously, I can’t add “All” category to data...

C#.NET ComboBox control

Hi All, I have an application working on hand held device with .NET compact framework, using C#.NET. The problem I am facing is ComboBox control is behaving very un-cenrtain, sometimes it shows the contents but some times it just shows System.DataRow kind of string in ComboBox. Although it shows this System.DataRow string but it still h...

Problem with combobox dropdown

Hi all, I have a problem regarding combobox dropdown. Once a dropdown is opened, if I want to move focus to other control (say a textbox), I need to click twice because on first click, the combo dropdown is closed and then on second click, the textbox gets focus. How should I fix this? Please help. ...

Unable to set initial value when databinding combobox to Dictionary<char,string>

I have a simple Dictionary defined as ResultOptions = new Dictionary<char, string> and my viewmodel has a public property ResultCode of type char. My XAML is as follow: <ComboBox ItemsSource="{Binding ResultOptions}" DisplayMemberPath="Value" SelectedValuePath="Key" ...

How do I bind a javascript event handler to the Ajax Control Toolkit combobox when textbox changed

I need a combobox for an ASP.NET project, so I decided to use the Ajax Control Toolkit combobox (http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx). I don't want to use the postback as I don't want the page reloaded, but I need to know when the text in the textbox is changed so I can call out to the server to per...

WPF Combobox DisplayMemberPath

Ok, I looked at other questions and didn't seem to get my answer so hopefully someone here can. Very simple question why does the DisplayMemberPath property not bind to the item? <ComboBox Grid.Row="1" Grid.Column="2" ItemsSource="{Binding PromptList}" DisplayMemberPath="{Binding Name}" SelectedItem="{Binding Prompt}"/> The trace ou...

problem of entering text in combobox created by using <sx:autocompleter>

im trying to use autocompleter tag for displaying autosugget in my application,but with the following code i am not able to write in the combo box but has a populated list which is displayed when down arrow image(along with the combo box) is pressed. <sx:autocompleter list="state" name="StateName" list="{'CA','TR','GP','CL'}" searchT...

C# Silverlight - Combobox with TwoWay Binding ?

EDIT: The Answer I was looking for was.... <dataFormToolkit:DataField Label="Business Type:"> <ComboBox x:Name="BusinessType" SelectedItem="{Binding BusinessType, Mode=TwoWay}" > <ComboBox.Items> <sys:Stri...

jQuery: events when input changes

I have a select that I want to run various functions on depending on what's selected. I've also used the flexselect plugin http://rmm5t.github.com/jquery-flexselect/ to transform the select box into a combo box. The result is an input box. I want to run a function when the input box text changes, not on blur, but right away. I don't see...

Displaying the selected item differently in ComboBox

I have a combo box in which I set up an ItemTemplate that looks something like this: <ComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Piece.NoPiece}" Width="50" /> <TextBlock Text="{Binding Piece.Description}" Width="170" /> <TextBlock Text="{Binding Piece.Cat...

ajax :populating 2 drop down boxes via ajax using value of the third one

i hava a html page with 3 drop down boxes. When i change one of the box the value in that box is sent to server and the server shold returns the values of the other 2. How will i populate the othere 2 drop down boxes depending on the value of first one. All valuses are obtained frm server side. EX dd1 , dd2, dd3 where dd= drop down box...

How to send a CBN_SELCHANGE message when using CB_SETCURSEL ?

When using the CB_SETCURSEL message, the CBN_SELCHANGE message is not sent. How to notify a control that the selection was changed ? P.S. I found on the Sexchange site, a very ugly hack : SendMessage( hwnd, 0x014F/*CB_SHOWDROPDOWN*/, 1, 0 ); SendMessage( hwnd, 0x014E/*CB_SETCURSEL*/, ItemIndex, 0 ); SendMessage( hwnd, 0x0201/*WM_LBU...

WinForms - Prevent the Changing of a ComboBox - DropDownList mode

In Winforms what is proper way to keep a user from changing the value of a DropDown? I want to prompt the user to say that there are unsaved changes. If the user decides to not throw away these changes I want to cancel the combobox changing. Any ideas on how to do this? I though I had seen a e.Cancel option before. But maybe not on Syst...

Combo box selectedindex in Silverlight 3

How to update the selectedindex of Combo box in Silverlight3 within Dataform. I am also using RIA. I tried updating in both Dataform_Loaded and Dataform_contentloaded the object is not created at that time. I get out of range error though I am seeting the selectedindex = 0; Here is the code private void RacesForm_Loaded(object send...

C# Silverlight Combobox - what is up with this?!

I have a c# silverlight business application that uses the ado.net entity framework and the domain service class to bind to my sql server database and pull data from/ persist data to my database. I have been using the dataformtoolkit namespace to layout textboxes which can be edited/display data, using a TwoWay binding mode in order to a...

How to retrieve combobox selection in a windows form

All, I have a simple windows form with a combobox and a 'OK' button. After clicking the 'OK' button, I want to retrieve the selected combobox value. The GetUserForm has 2 controls: combobox named cmbUser, with a list of 2 values button named btnOK Nothing has been done to the GetUserForm class itself. The class contains: public par...

Combobox Dataprovider - Only gets labelField from XML not the associated ID.

Hello guys. Back again this time working with data providers. Well i been doing a bit of training with Flex, and I've searched, and i managed to get a ComboBox being populated through XML data. Its works pretty well, he gets the LabelField for each item from XML, but the ID associated to each item he doesn't get then from the XML. Cod...

Setting the width of a Silverlight combo box to accommodate its widest item

In a Silverlight application I have a number of combo boxes with data content. How do I set the width of the combo box so that it can accommodate its widest item? I have created a hack that works in WPF, but it does not work in Silverlight – which is both unfortunately and expected ;^( I might be able to create a workaround by measurin...

Dijit Combobox filter autocomplete

Hi All, I'm using dijit combobox for populating a JSON List. Also I'm using ItemFileReadStore for getting the JSON data from the server. Once the data is downloaded, when I click on the combobox it shows all the data. But I don't want the user to see all the data. The user should see the list only when he types something. I tried using q...

Why won't these combo boxes update correctly when changing datasource in Windows Forms (VB) ?

In a windows forms project, I have several combo boxes. The first combo box contains a list of objects. Those objects then have several lists which are used as the datasource's for the successive combo boxes, depending on which item is chosen in the first. When the first item is selected, the other combo boxes update correctly. When thi...