combobox

Catching ON_CBN_SELCHANGE and other dropdown events when extending CFileDialog

I am trying to create a custom file save dialog for XP using C++/VS2008. My dialog will have three dropdowns and an edit box. I need the contents of the dropdowns to dynamically update when selections are made on other dropdowns. Hence, my need to catch the CBN_ events. I've created a class that extends CFileDialog and a class that exte...

WPF: TreeView inside a ComboBox

I'm trying to put a TreeView inside a ComboBox in WPF so that when the combo box is dropped, instead of a flat list the user gets a hierarchical list and whatever node they select becomes the selected value of the ComboBox. I've searched quite a bit for how to accomplish this but the best I could find was only peices of potential soltui...

Need a little help with ComboBox DataBinding DisplayMember and LINQ queries

Update I decided to iterate through the Data.DataTable and trimmed the values there. Utilizing SirDemon's post, I have updated the code a little bit: Sub test(ByVal path As String) Dim oData As GSDataObject = GetDataObj(path) EmptyComboBoxes() Dim oDT As New Data.DataTable Try Dim t = From r In oData.GetTable(St...

Differentiating between events raised by user interaction and my own code

The SelectedIndexChanged event gets fired in my application from a combo box when: the user chooses a different item in the combo box, or when: my own code updates the combo box's SelectedItem to reflect that the combo box is now displaying properties for a different object. I am interested in the SelectedIndexChanged event for case ...

C# How to set the autopostback property when using asp.net mvc?

I am using asp.net MVC framework. On my page i have a dropdwonbox and when an option is clicked i want to go to another page. But i can't find how/where to set the autopostback property to true. This is the code i'm using: Aspx: <%= Html.DropDownList("qchap", new SelectList( (IEnumerable)ViewData["qchap"], "Id", "Title" )) %> Control...

Using combobox properties in C# NET 3.5

Hello, I'd like to know how to set a combobox to be read only,meaning the user cannot write text into it,but just select? Another question,how to determinate the text of the selected choice.For example it has index of 4 values(10,20,30 and 40).If the user chooce 20,how can I get the Text of the choice he selected(Not the index number,b...

Use a My.Setting as Datasource for multiple ComboBoxes

Hi, I want to maintain a list of potential ComboBox values over multiple executions of my program, and to use that list as the DataSource on multiple ComboBoxes. I also want changes made to the DataSource to propagate over all of the ComboBoxes already existing in the application. Can someone recommend what type of object I should use a...

Is it possible to customize the DisplayMember of a DataBound ComboBox?

Solution This is what I came up with: Public Class IndexedDropDownItem Private _KeyCode, _Display As String Public Property KeyCode() As String Get Return _KeyCode End Get Set(ByVal value As String) _KeyCode = value End Set End Property Public Property Display() As...

Applying a DataGridViewComboBoxCell selection change immediately

When I change a value in a DataGridViewComboBoxCell the new value is not immediately applied until that cell leaves focus. Is there a way to have the new value applied immediately? ...

How can I make my Windows Form to do and display my database query?

I have 3 Tables: Titles: TitleId (int 6, primary key) TitleName (varchar 50) Authors: AuthorId (int 6, primary key) AuthorName (varchar 50) AuthorsTitles (this is a junction table for Titles and Authors) TitleId (int 6) AuthorId (int 6) There's a "many to many" relation: A Title may have many Authors, and an Author may ha...

States and Countries select box - best way to do it?

Hi guys, this may seem trivial but I'm setting up, on a profile form page I'm building, a countries and states select box such that when you select the US or Canada then the states box would display states of the selected countries else it would display a None Applicable instead. My countries and states are in a database and I'm populati...

Bind a My.Settings StringCollection to multiple ComboBoxes

Hi, I have a set of ComboBoxes. I want to use them mostly like short data-entry TextBoxes, so I have them set to AutoCompleteMode = SuggestAppend AutoCompleteSource = ListItems DropDownStyle = DropDown What I want to do is to have each ComboBox have a common DataSource (the My.Settings StringCollection) whereby any String ad...

Slow scrolling in ComboBox

Hi, I have a problem where scrolling in both a toolStripComboBox and regular ComboBox is really slow. This happens both using the arrowkeys and the mouse scrollwheel. However, if I use the scrollbar it behaves as expected. Here's the toolstrip combobox: // // toolStripComboBoxDeild // this.toolStrip...

C#: How to get the number of items in a combobox

Hello, How can i get the number of items listed in a combobox? ...

How to avoid showing loading text in Ext.form.ComboBox?

I use Ext.form.ComboBox in very similar way as in this example: http://extjs.com/deploy/dev/examples/form/forum-search.html What annoys me is that when the ajax call is in progress it shows loading text and I cannot see any results from before. Eg I input 'test' -> it shows result -> I add 'e' (search string is 'teste') -> result diss...

How can I handle ComboBox selected index changing?

Hello, I have a ComboBox that have a list of manufacturers. When a user selects a manufacturer, a grid below is populated with data for the chosen manufacturer. That data can be modified. The user has to press the Save button after all changes are done. But the user can forget to press Save and select another manufacturer from the Comb...

[WPF] ComboBox Style problems with DisplayMemberPath

I have a ComboBox and I have set the combo.ItemsSource property to a List object. The Book class contains two properties: "Abbreviation" and "Name". I have set the ComboBox's DisplayMemberPath to "Abbreviation" but the following style that is set on the ComboBox does not display the Abbreviation property, but instead shows "Words.Book" ...

Editbox portion of ComboBox gets selected automatically

Hello, I have a small problem that has been annoying me for some hours. In my WinForms (.NET 3.5) application I create some ComboBoxes (DropDownStyle = DropDown) in a TableLayoutPanel at runtime and fill it with strings. The ComboBoxes are configured to resize automatically (Anchor = Left | Right). The problem is that whenever the Com...

Question about ComboBox and Linq to Sql for Winforms...

Edit: More than a day. Still no answer! Is question not clear? I have ComboBox bound to BindingSource which in turn is bound to Linq Table. Also, ComboBox is filled from datasource which is a Linq Table. I want to assign new value to one of properties of BindingSource.Current whenever user selects item in ComboBox. I understood from M...

WPF ComboBox custom Scrollbars

I'm looking for a resource on how to change the size (width) of the scrollbar presented by a combobox in WPF. ...