combobox

how to add combobox item value in string collection editor in c#?

Hi, I can add an item and its value to a combobox with following code. combobox1.Items.add(new Item("text","value")); how do I add a value to a text in string collection editor? I can only add text in string collection editor. ...

VB6: Extend number of items in combo box

Is there a way to extend the number of items that appear in the VB6 combo instinsic control, when it drops down? I have about 10 items and I'd like to show them all. ...

How to add typeahead search to WinForms ListBox (or ComboBox)?

In .Net 2.0, the WinForms ListBox and ComboBox controls allow you to search through the list by pressing the first letter of the list item on the keyboard. Subsequence presses of that key will cycle through the list items starting with that letter. A browser like FireFox on the other hand lets you "typeahead" search for items in a list...

Trigger seems not to fire, what am i doing wrong?

I have enter actions defined for two triggers as such: <Trigger Property="ToggleButton.IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard x:Name="GlowStart_BeginStoryboard" Storyboard="{StaticResource GlowShow}"/> </Trigger.EnterActions> </Trigger> <MultiTrigger>...

Saving last selected item on a combobox

Hi, I want to save the last selected value in a combobox that displays the data of a DB column, I've tried to save it as a text property but it doesn't work. what can i do? thanks in advanced. EDIT: The code generated in the settings.settings file is like this: [global::System.Configuration.UserScopedSettingAttribute()] [gl...

get font from combobox and apply it to richtextbox (vb.net)

I am building a word pad clone with extra a few extra features. I am trying to get two combo boxes (one with font names, the other with font sizes) to apply their selected attribute to the selected text in a richtextbox. This was my latest attempt, and I think I'm starting to get close, but I still get an error for InvalidCastException -...

Flex Combobox - Edit/Delete an option

Hi, I'm using a combo box control and the dataprovider is set as an XML. After the dataprovider is set, I want to edit the text of the first option and also I need to insert an item in the second position. How can I do this? Using an ItemRenderer? Please give your suggestions. ...

Need sample java to query mysql and dispay result upon combo box update

I have a combo box that will be loaded with a list of choices. When the user selects a choice, I need a javascript to simply run a query of mysql (obviously based on the user choice in the combo box) which will return a simple, discrete value that then needs to be displayed on the page next to the combo box. The query is nothing more t...

Proper way to map combo box lines to their corresponding strategy objects?

I have a situation that is pretty simple, and I'd like to know the ideal way to do it. I have a combo box. Each line of the combo box corresponds to a particular strategy object. What is the proper way to map the combo box lines to the strategy object. The way I was doing it seems overly complicated, and I'm pretty much guarantee...

How can I draw a custom ComboBox inside a DataGridViewCell?

I have a custom ComboBox control that I want to use in a DataGridView. I first inherited DataGridViewCell and am trying to achieve my goals overriding the Paint() method. The problem is that after inheriting DataGridViewColum and setting the CellTemplate property to a new instance of my CustomDataGridViewCell class, the cell is grey with...

Selecting items in a combobox and removing them

Hi, I want to find an Index of a combobox using numbers in the text of a textbox, and then remove them. The items that populate the combobox belong to a data base so I use the Delete method to remove the rows. EDITED: I've been reading and the findstring finds text within the item list, not the index. Is there anyway to look for the ...

How to use combo box in c#

I don't no idea where to start. i tried DataTable but it didn't work.(This is an easy question :) ) I tried everything { var test = new DataTable(); test.Columns.Add("test"); test.TableName = "test"; test.Columns.Add("test"); comboBox1.DataSource = test.XXXX ; } Help please. Thanks. ...

WPF databinding to System.Data.Linq.Table<T>, how to update the interface?

I have this combo bound to a linq table. Is there a lightweight way to update the UI (combo values that are displayed to the user) when I insert a new record in the linq table? Basically from what I understand I should have used an ObservableCollection, but I don't want to copy the data back & forth from the linq table to that collect...

WPF - ComboBox binding issue

Hi, I'm using WPF/MVVM and am having a binding issue with a ComboBox - any help appreciated! Heres my Combo ... <ComboBox Name="ComboBoxAvailableCriteria" Width="255" ItemsSource="{Binding AvailableCriteria}" DisplayMemberPath="SearchableAttribute.Name" /> And heres my ViewModel ... private List<SearchCriteria> _availableCriter...

Silverlight DataForm, Child Window, ComboBox, DataContext

I have a child window that contains a DataForm. In the DataForm there is a combobox. I have a DataContext set on the parent window that is opening the child window. Before I open the child window, I set the myChildWindow.DataContext = myGlobalDataContext. I have the ComboBox ItemsSource={Binding Path=MyCollectionInMyGlobalDataContex...

disable some dropdown select controls when a user clicks on a checkbox

i have a time dropdown that shows hour in one select, minutes in another and AM/PM in a third. I have a checkbox that says "All day" i want it so when the user checks on "All day" all of the select dropdowns become disabled. ...

using a win form combo box Items.AddRange method

I have an array of objects that I'm trying to add to the Items collection of a combo box control using the AddRange method. The method takes an object[] but when I pass it the name of the array which has been intialized with some values, it complains: The best overloaded method match for 'System.Windows.Forms.ComboBox.ObjectCollection....

combobox doesn't hold new index on postback if set to 0

I am populating an ajax toolkit combobox based on the selection in another field. On the postback I always want to set the index of the combobox to 0 (the first value in list). If I programmatically always set it to 1 or 2, it works and the selected index and displayed value are correct (assuming there are enough values in the list). How...

Unselect Databound Combobox Winforms .NET

The problem: combobox is databound to a DataView, first item in the dataview is DataRowView whose fields are DBNull.Value; Combo DropdownStyle = ComboBoxStyle.DropDownList Loads fine, displays fine, selects fine, problem is to Unselect via code. Setting the SelectedIndex to 0 throws an exception. (Setting to -1 is a no-no as per msdn do...

C# databinding on combobox

Hello, I can't understand the following 2 issues given this code. I mapped a combobox to a custom object and I want each time that the selected value change on the combobox, the custom object changes too. public partial class MainForm : Form { private Person _person; public MainForm() { InitializeComponent(); ...