FAQ Database Discussion Community


How can I specify a column to fill an Excel Combobox?

excel,vba,excel-vba,combobox
First time asking here, so sorry if you find it annoying. I've been trying to fill a ComboBox in an Excel Sheet with the result set of a DB procedure. So far, I've received the result set correctly, but when I try to specify the column I'd like to use...

Drop down values are not getting listed in combobox in winform

c#,windows,combobox
I am using data grid control in windows application. I want to add one column as combo box which will load the drop down values from a data table. below code I am using to create it. DataTable Dt = new DataTable("Table1"); Dt.Columns.Add("Id"); Dt.Columns.Add("Value"); Dt.Rows.Add(new object[] { "1", "Item1" });...

Combobox value (binded with an enum) in an instance

c#,combobox,enums
Good day lads! I've got a question. I think I'll be saving loads of text if you would see my form, so here we go! Form: private void Form1_Load(object sender, EventArgs e) { /* Held h1 = new Held("Tank", Lanes.Top); Held h2 = new Held("ADC", Lanes.Bot); Held h3 = new...

C# ComboBox SelectedItem.toString() not returning expected results

c#,combobox,treeview
I have a form that allows a user to add players to a roster, by entering the player name and selecting, from a combo box, the division to which the player belongs. When time comes to add the player to my TreeView control, the node that should display the division...

Static ComboBox in VS LightSwitch

c#,combobox,visual-studio-lightswitch
I have a screen in LightSwitch, which shows some data items. The User has the ability to Click on a button in Command Bar to start custom routines to print labels, do mail merge,... now what i want to achieve is: instead of directly running the routines for mail merge...

dataChanged signal does not work with ComboBoxDelegate

c++,qt,combobox,qtableview,qstyleditemdelegate
My problem is the following: There is a QTableViewand a QStandardItemModel used in this way: ui->tableView->setModel(model); model->setItem(myrow, mycolumn, myQStandardItem); and a comboboxdelegate: ComboBoxDelegate* mydelegate = new ComboBoxDelegate(); ui->tableView->setItemDelegateForColumn(mycolumn,mydelegate); Every time the value of a cell of the table is changed (by the combo-box) i need to catch the new value...

Invoke a ComboBox's enter key/action event handler regardless of value property change

java,combobox,javafx,javafx-8
With an editable ComboBox, is there any way to have the ENTER key event or action event handler occur regardless of whether or not the Combobox's value property has changed? I essentially would like to have the same behaviour in a ComboBox's TextField on pressing the ENTER key as it...

ExtJS filter ComboBox dynamically

javascript,extjs,combobox
I have a property grid with multiple comboboxes and I want to filter the values in one box based on what is selected in the previous box. My code looks like this: var tempPropGrid = me.getView().add( { xtype:'propertygrid', width: 80, header: false, title: 'prop grid', //for some reason the headers...

Why does tkinter.ttk Combobox clear displayed value on initial selection only?

python,python-3.x,combobox,tkinter,ttk
I am building a gui in tkinter and I am seeing a curious behaviour for a ttk.Combobox. Everything initializes fine, but when I select an item from the dropdown, the combobox display clears. This only happens the first time I make a selection. So I start the app > make...

How can I exclude .xlsb file types in my ComboBox?

excel,excel-vba,combobox
I have a Userform that is essentially two combo boxes that are populated by the open workbooks. Is there a way I can exclude PERSONAL.XLSB from this list? This what I have: Sub UserForm_Initialize() Dim wkb As Workbook With Me.ComboBox1 For Each wkb In Application.Workbooks .AddItem wkb.Name Next wkb End...

Editable ComboBox binding and update source trigger

c#,wpf,binding,combobox
Requirement I want to have ComboBox where user may enter some text or choose text from drop-down list. Binding source should be updated when user press Enter after typing or when item is simply selected from drop-down list (best View behavior in my case). Problem when UpdateSourceTrigger=PropertyChange (default) is set,...

Set ComboBoxCell in TableView JavaFX

combobox,javafx,tableview
i followed the instructions from this question to set a ComboBoxCell in the TableView of my application. (How to put ComboBoxTableCell in a TableView?) The declaration of the Cell works fine, but the comboBox doesn't appear in the table. I think it's like this, because only col1 and col2 are...

How to add items to ComboBox as tree list

c#,winforms,combobox,tree
I have problem: I want show items in ComboBox as they are categorized. As shown in figure: I have two attributes in my table , one is vendorID , the other is vendorType . I want to show these vendor types in the ComboBox How I should do this?...

Code not following sequential order in source

c#,ms-access,combobox,oledbconnection
I have a settings form, on which lies a combobox that I would like to fill on load of the form with data returned from an access database. Where I'm having difficulty is actually setting the combobox's datasource - when the program executes, it jumps from filling the OleDbDataAdapter to...

Combobox and IDataErrorInfo

wpf,vb.net,mvvm,combobox,idataerrorinfo
This is my problem. When I select an item from the combobox, (combobox is populated) I have always red outline. Why ? <ComboBox x:Name="Cmb_USER" TabIndex="5" ItemsSource="{Binding User_USER, ValidatesOnExceptions=True, ValidatesOnDataErrors=True,NotifyOnValidationError=True}" IsEditable="True" DisplayMemberPath ="DescUser" Text="{Binding Path=USER}" Margin="114,105,98,179"/> Public Property User_USER As ObservableCollection(Of Model_User) Private p_USER As String Public Property USER() As String...

Remove Combobox winrt flayout heading

combobox,windows-runtime,styles,winrt-xaml
In winrt windows phone app when you have more than 5 items in a combobox, it opens up on a full screen. And on top its written 'Choose an item'. I want to remove this heading from all my combo boxes....

Populate Userform textbox based on cell selected by Combox

excel,vba,combobox,textbox,userform
In my excel document I have the following information in two columns: US Dollar (USD) 1 British Pound (GBP) 0.63 Guatemalan Quetzal (GTQ) 0.13 Honduras Lempira (HNL) 0.046 Other Please give factor Other Please give factor Other Please give factor Other Please give factor I have a combobox that is...

Java Combobox with Arraylist error

java,swing,combobox
i Am very new to using swing and using Jcombo box, i was attempting to create a drop down list with the train lines, stations, and I'm receiving errors, i have a feeling i may be importing the data into the array list wrong, but the program spits out the...

How can i set the selected index with data from server to a combobox in a jqgrid

c#,jquery,.net,combobox,jqgrid
I have a jqgrid with a column with a combobox (select), and i set the values in editoptions through a function that returns the required options. My problems is how can i bring there the values saved: e.g: my options are : 1:yes,2:no,3:maybe From the server a client have the...

VAADIN: Why I can't set a converter to a ComboBox?

combobox,type-conversion,converter,vaadin7
I've made a converter: public class BooleanToDateConverter implements Converter<Boolean, Date> { private static final long serialVersionUID = 1L; @Override public Date convertToModel(Boolean value, Class<? extends Date> targetType, Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException { if (value == true) { return new Date(); } else { return null; } } @Override public Boolean...

Need to 'BindingList' a member of a struct to a combobox

c#,winforms,combobox,bindinglist
Good Morning: I have a situation where I have this struct: private struct EmployeeInfo { public string LastName; public string FirstName; public string FullName { get; set; } public string Address; public string EmployeeID { get; set; } } private BindingList<EmployeeInfo> ei = new BindingList<EmployeeInfo>(); I have a ComboBox on...

Binding Element to Property from Inherited Data Context

c#,wpf,xaml,combobox
I have a WPF control pane with sixteen of the same child control containing a combobox that needs to be bound to a list in the Parent Control code behind. I was really struggling to get this list to bind until I found this: Binding objects defined in code-behind. Setting...

Get value of a ComboBoxTableCell

combobox,javafx,tableview
I used this code to put a ComboBoxCell into my Table named "ComboTable". The data of the first two colums is given by a database-connection below this code. ComboTable.setEditable(true); col1.setCellValueFactory(new PropertyValueFactory<model, String>("rCol1")); col2.setCellValueFactory(new PropertyValueFactory<model, String>("rCol2")); col3.setCellValueFactory(new PropertyValueFactory<model, String>("rCol3")); col3.setCellFactory(ComboBoxTableCell.forTableColumn(cbValues)); // ChangeListener...

How can I access the selected element of a combobox in AngularJS?

javascript,html,angularjs,combobox
I put an array into a combobox and want to delete the marked element (selected via click on element in combobox) when pressing a button. How can i access the selected element? my html: <div ng-controller="MyCtrl"> <select size="5"> <option ng-repeat="element in elements">{{element}}</option> </select> <button ng-click="removeSelected()">Delete selected</button> my js: function MyCtrl($scope)...

Selecting values from a combobox

php,jquery,mysql,combobox
I have 2 comboboxes. <select name="ticketType"> <option selected>Ticket type</option> <option value="55">Promo pass</option> <option value="65">Regular pass</option> </select> <select name="campingNumber"> <option selected>Camping spots</option> <option value="0">0</option> <option value="30">1</option> <option value="50">2</option> <option value="70">3</option> <option value="90">4</option> <option...

DropDown in datagridView

c#,visual-studio-2013,datagridview,combobox,ssms
hello i have 2 datagridViews in a windows form and i have a combobox in 1 datagridview somwthing like this when i change the value of the combobox the tables in the datagridview should be updated.For example if i select the second combobox as outputmetadatafield1 then the columns of that...

Duplicate output with ItemStateChanged listener on JComboBox [duplicate]

java,combobox,listener,netbeans-8
This question already has an answer here: JComboBox itemStateChanged event called twice at a time 2 answers I have a JComboBox and after every change I want to print out the selected item. This is the code for my JCombobox: mycombobox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item...

How to assign new value into combo box list?

c#,combobox
I am working with windows CE and my interface as well as its content are generated dynamically based on the selected database. The combo box fetches values from database (description table) and saves the selected value (value table) into different table. There is no problem during insertion. The combo box...

Displaying certain items on a ComboBox

.net,vb.net,combobox
I got a problem where I need to show specific calibration gases that are in current use, but I need to keep the expired gases for historical reasons. There are over 100 records in our database, so it's a long list! The list is being populated from a SQL Server...

Can I setup my dojo dijit form ComboButton to do a onClick or something similar when the user selects a value in the drop down list?

javascript,combobox,dojo,dijit.form
I think I may be using the wrong dojo widget. I just need a dropdown list really, but currently have setup a ComboButton. Can I setup an onClick or onSelect of some sort when the user picks an option inside the ComboButton down down menu? My current onClick is picking...

Set ComBox to ComboBoxItem based on content

c#,wpf,combobox
I have a combobox with comboboxitems hard-coded in the xaml, and I am trying to set the value of the combobox programatically based on a string value. XAML: <ComboBox Name="comboCondition"> <ComboBoxItem>Item 1</ComboBoxItem> <ComboBoxItem>Item 2</ComboBoxItem </ComboBox> Code that I would normally use when not using ComboBoxItems: comboConditionValue.SelectedItem = "Item 1"; Of...

How fill combobox using with enum - show integers(values) of enum in combobox

c#,winforms,combobox,enums
Here is my enum : Name = Value public enum BitRates { bitrate_32 = 32, bitrate_40 = 40, bitrate_48 = 48, bitrate_56 = 56, bitrate_64 = 64, bitrate_80 = 80, bitrate_96 = 96, bitrate_112 = 112, bitrate_128 = 128, bitrate_160 = 160, bitrate_192 = 192, bitrate_224 = 224, bitrate_256 =...

Combobox SelectedValue Returning System.Data.DataRowView even Converted to String

c#,winforms,combobox,dataset,datasource
I am trying to change value of a TextBox control after the value of ComboBox changes. My code returns System.Data.DataRowView on the first time ComboBox value changes. That is why I am getting an Object instead of the actual value on first call to my combobox. private void radioButton2_CheckedChanged(object sender,...

How do I make a quiz become graded via combo box results c#

c#,math,combobox
Hi so I'm just making a little tiny quiz and I was just wondering how I would calculate my score from the selected results in a combo box. I tried this and to test to see what my answer was I just displayed a messagebox, but the answer always turns...

Combobox and deleted record

c#,wpf,combobox
I have 2 related tables - CarMarks and CarMarkGroups. Any CarMark has CarMarkGroupID. I have edit form for CarMarks with combobox binding to CarMarkGroups. I mark one of CarMarkGroup as deleted record. So, this marked CarMarkGroup is not in list binding to combobox (because I must show only active CarMarkGroups)....

How can I filter through a table using a ComboBox?

combobox,sapui5,sapui
The only thing I need to know is if I can create a value for an item in the ComboBox, then I think I will be able to accomplish the task at hand. Would I do something like: var oItem1 = new sap.ui.core.ListItem("lab", { text: 'Lab', value: 'Lab' }); var...

JavaFX: Expand a ComboBox programmatically

java,combobox,javafx
Does anyone know how to expand a ComboBox by code? I know that in C# we can do this by comboBox1.DroppedDown = true;, but how do I do this in JavaFX?

Dynamically fill comboBox providers in Flex Datagrid

flex,combobox
I am trying to dynamically add comboBox's to a DataGrid, and for each comboBox I expect a unique dataProvider. So for example I have built a grid as follows: <s:DataGrid id="testGrid" horizontalCenter="0" width="100%" dataProvider="{testArr}" gridClick="handleTestGridClick(event)"> <s:columns> <s:ArrayList> <s:GridColumn dataField = "valName" headerText="Name"/> <s:GridColumn dataField = "testVals" headerText="Selections> <s:itemRenderer> <fx:Component> <s:GridItemRenderer>...

WiX: Install component based on ComboBox selection

combobox,wix,condition
I'm trying to create an installer which installs some components based on the selection of a Combobox but it seems like the condition isn't working. I declared the Combobox as the following: ... <UI> <ComboBox Property="Option"> <ListItem Text="Red" Value="red" /> <ListItem Text="Blue" Value="blue" /> <ListItem Text="Green" Value="green" /> </ComboBox> ......

Delphi ComboBox Access violation on combobox

delphi,ms-access,combobox,tadotable
I get Access violation error, but I know the code is correct, so where could be the problem? I'm trying to fill a ComboBox whit data from a local AccessDB. var i : integer; x : string; begin with DataModule3.ADOTable1 do begin if RecordCount > 0 then for i :=...

Bind TextBox to ComboBox in Access

vba,ms-access,combobox
I have an Access table that looks like this: +------------+--------+--------+--------+-------+ | PartNumber | Thing1 | Thing2 | Thing3 | Item1 | +------------+--------+--------+--------+-------+ | 123 | ABC | XYZ | ASD | poi | | 456 | QWE | SDF | ERT | lkj | | 789 | JKL | IOP...

ComboBox binding works only one way with Color property

wpf,binding,combobox
I'm implementing an ObservableCollection <-> DataGrid binding. My class consists of a System.Windows.Media.Color field (named 'Color') and several strings. My implementation in WPF of the Color column: <DataGridTemplateColumn Header="Color" Width="100"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding Source={StaticResource ColorProperties}}" SelectedItem="{Binding Path=Color, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Style="{StaticResource ComboBoxFlatStyle}">...

Access VBA Filtering a combo box list based on Date field

sql,vba,ms-access,combobox,access-vba
This is the line of code I am using to filter the EquipmentID1 combo box: EquipmentID1.RowSource = "SELECT tblEquipment.Equipment, tblEquipment.UnavailableFrom FROM tblEquipment WHERE tblEquipment.UnavailableFrom >= " & Me!EndDate & " OR tblEquipment.UnavailableFrom Is Null;" UnavailableFrom is a date/time field in the tblEquipment table, and it can be empty. But the...

How can I show 2 columns in a combobox? (multiple values)

c#,combobox
Right now I have this: da = new SqlDataAdapter("SELECT * FROM LOGIN WHERE RECHTEN=2", conn); dtt = new DataTable(); da.Fill(dtt); for (int i = 0; i < dtt.Rows.Count; i++) { txtKlantid.Items.Add(dtt.Rows[i]["klantId"]); } Now it only shows the klantId, but I also want to show the name. And when I've that,...

I'm retrieving a value for a combobox with custom class items but I can't make it show the item

c#,winforms,combobox
I wanted to have items and hidden values which I could call later so I used this Article to create my custom items. But now that I'm calling one value I cannot make it show the proper item. The combobox stays null. if (reader.HasRows) { reader.Read(); namebox.Text = reader["c_Name"].ToString(); lastbox.Text...

Retrieve text from control

vb.net,visual-studio-2010,combobox
I am developing a program for visual basic 2010. I have a ComboBox which has a drop-down box containing information like this: "I like apples: 123". Now I would like to get the information which is after the ":", 123. How can I get this information into the ComboBox text...

JavaFX disabled element styling

css,combobox,javafx
I have a combo box with some data. public class Test extends Application { public static final String[] items = "One Two Three".split(" "); @Override public void start(Stage primaryStage) throws Exception { final ComboBox<String> box = new ComboBox<>(FXCollections.observableArrayList(items)); box.getSelectionModel().selectFirst(); primaryStage.setScene(new Scene(box)); primaryStage.show(); } } If I set combo box disabled...

WPF - How to highlight a combobox border when focused

wpf,combobox,styles
I trying to create an application combo box theme. However I need the combo box border to change colour when tabbed to. I've tried everything, but I can't seem to get it right. Any help would be appreciated. <SolidColorBrush x:Key="NouvemWhiteBrush">White</SolidColorBrush> <SolidColorBrush x:Key="NouvemSecondaryMainBrush">#FFF58E0F</SolidColorBrush> <Style TargetType="{x:Type ComboBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type...

How do you populate a Combobox based on the selection of another Combobox?

python-3.x,combobox,tkinter
I am trying to populate a combobox based on the selection of another combobox. I can do this if I use an update button to update the combobox#1 selection.However, I would like to do the update dynamically. I have attached a simple example of code that seems to work as...

Windows ComboBox Selected Item (populated from List<>)

c#,windows,combobox,generic-list,selectedvalue
I am setting a combobox item like this: List<Object> items = new List<Object>(); items.Add(new { Text = "MyVal", Value = 1 }); cbo.DataSource = items; It then in VS returns: But I cannot simply now say cbo.SelectedItem.Text or cbo.SelectedItem.Value. If i try this, I get the error "object does not...

How to retrieve name of dynamically created ComboBox in VBA?

excel,forms,vba,excel-vba,combobox
I would like to reference the value of ComboBoxes I created using a loop, but I do not know what their name is. How can I find their name? Sub addLabel() Dim theLabel As Object Dim theRanker As Object Dim labelCounter As Long Dim RowCount As Integer RowCount = Sheets("Overview").Range("A"...

Cant bind enum to combobox wpf mvvm

c#,wpf,mvvm,combobox,enums
A have read a lot of method about the ways of binding enum to combobox. So now in .Net 4.5 it should be pretty ease. But my code dont work. Dont really understand why. xaml: <Window x:Class="SmartTrader.Windows.SyncOfflineDataWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="SyncOfflineDataWindow" Height="300" Width="300"> <Grid> <StackPanel> <ComboBox ItemsSource="{Binding StrategyTypes}" SelectedItem="{Binding StrategyType}" />...

VBA - Userform - Combobox - Select Workbook/Sheet

excel-vba,combobox
I asked another question recently, which helped me get to a certain point with my 'combobox' userform but now need a little more help to get me over the line please. I've created a userform which has 2 comboboxes, 1 which displays all the open excel workbooks and 1 which...

ComboBox style in universal app

c#,wpf,combobox,win-universal-app
I am overriding style for combobox in universal app using wpf. Everything works fine on windows 8.1, but on windows phone 8.1 I got error stating that no resources with the key/name ComboBoxThemeMinWidth exists. <Application x:Class="wcc.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:wcc" RequestedTheme="Dark"> <Application.Resources> <Style TargetType="ComboBox"> <Setter Property="Padding" Value="8,0" /> <Setter...

How to use multiple combo boxes to filter data in MS Access?

database,filter,combobox,ms-access-2007
I am learning MS Access 2007. I have few tables linked together as follows: OwnerList ID | Project Owner | Address etc ProjectList ID | Project Name | Project Owner (Linked to OwnerList.ID) | etc PartList ID | Project Part | Project (linked to ProjectList.ID) | etc SubpartLIst ID |...

How to display an error on a field when the value of another field changes

c#,wpf,xaml,mvvm,combobox
I have a WPF application with a dialog box that allows the user to edit the settings of an object. I'm using MVVM for this dialog. My view Model Object for this dialog implements the IDataErrorInfo interface. One of the fields on the form is a ComboBox that is mapped...

Show value based on selection in combo box vba

vba,ms-access,text,combobox
I need to show denominations based on selection in combo box in my access form. The tricky thing here is that I need to show immediately after selecting in the combo box (without saving it). This one is working just after I save my selection. If cmb_Main_Impact.Value = "Productivity" Then...

PyQT4: Adding combobox in Qtableview

combobox,pyqt,qt4,tableview
I am new to PyQT. I am interested to add a combobox to the each row of tableView. Is it possible in PyQT 4? I know, it is possible in QT5, but not sure about PyQT. Thank you in advance for help....

Difference between Combobox properties SelText and Text?

excel,vba,excel-vba,combobox
I don't quite understand the differences between the combobox properties SelText and Text. If I want to send the content of a combobox as a parameter to another procedure, should I send .text or .selText? If I want to make enter text into a combobox using a macro, should I...

C# XAML - How to add a combobox to some datagrid ROWS but not others?

c#,wpf,xaml,datagrid,combobox
I'm using a key/value observable collection to hold data which is represented in the view by a two column datagrid. Some key values contain a list of items and other key values contain a single string value. Using the below code snippet I'm able to display those key values with...

Combo Box 1st item is remained empty in WPF c#

c#,combobox,wpf-controls
I have a combox in my wpf and 2 items called: Send Receive. I want to make the combobox to show a general message(send/receive) when the WPF is loaded up at first time. I tried to apply a string to the Text property in the XAML but it didn't work:...

C# WPF How to modify the ComboBox's selected item's color?

c#,wpf,combobox
I am having trouble with the ComboBox's selected item color... By default, when you select an item from the ComboBox, it's Black. How do I change the color of the item to White? I cannot seem to modify it. What's the deal?

Why is the ampersand missing in Firemonkey combo?

delphi,combobox,firemonkey
When you create a Delphi project and add a combobox and set ComboBox1.Items.Add('Zebra & Zulu') it shows "Zebra & Zulu" when you dropdown the list. Perfect. When you create a Firemonkey project and add a comboxbox or comboedit and set ComboBox1.Items.Add('Zebra & Zulu') or ComboEdit1.Items.Add('Zebra & Zulu') it shows "Zebra...

Can't retrieve and set a value in combobox inside ext.net gridpanel

extjs,combobox,ext.net,gridpanel
I'm having many issues with comboboxes inside ext.net grid panel. I need to set a default value when I insert new record. Actually I'm doing this: Javascript Code: function insertRecordTestesVerif(grid) { var store = grid.store, row = store.indexOf(store.insert(0, { Hora: new Date(), n_saco: 0, solda_status : "NA", peso: 0, peso_status:...

Add default item to ComboBox while binding data with DataSet - WinForm

c#,.net,winforms,combobox
My Code to Bind ComboBox in windows forms is like this ddlUsers.DataSource = dsUsers.Tables[0]; ddlUsers.ValueMember = "userID"; ddlUsers.DisplayMember = "Username"; I want to add a deafult Item as first element to this ComboBox, I have tried something like this ddlUsers.Items.Insert(0, "-Select a user-"); But it throws an error like this....

Items not adding to ComboBox

c#,combobox
I just started learning C# today. And I proceed already in creating GUI since some syntax are just like Java. Here's what I did so far: Click on the ComboBox in , Design tab. Then it directed me a method. Inside the method, here is my code: private void comboBox2_SelectedIndexChanged(object...

Dataset Loading a WPF Combobox

c#,wpf,combobox
DataSet dataSet = new DataSet(); using (SqlConnection connection = new SqlConnection("server=server; database=database; user id=user; password=user")) { connection.Open(); using (SqlCommand command = new SqlCommand("SELECT DISTINCT ID FROM TABLE ORDER BY ID ASC", connection)) { SqlDataAdapter reader = new SqlDataAdapter(command); reader.Fill(dataSet); IDComboBox.DataContext = dataSet; --> This doesn't work IDComboBox.Itemsource = dataSet.Tables[0].Columns[0].ToString() -->...

Displaying a date field from the java DB in 3 combo boxes in a Jform(GUI)

java,sql,database,date,combobox
So I've been busy making a program that pulls preset data from a java db in netbeans and displays it in a Jform GUI. All of my data displays correctly except for my date. In my db it is set in a date field so it is one value, but...

Update and sort Qt ComboBoxes alphabetically

c++,qt,sorting,combobox
I want to write a program, working like a little navigation system uisng the Qt framework, but i still am very new to it. I created a dialog with two Comboboxes. Each combobox contains all "citynames". At the initialization the content of both boxes is sorted alphabetically. If a name...

DataTrigger is not working

wpf,combobox,treeview,radio-button,custom-controls
I'm learning how to create custom controls in WPF, however I'm having problems about how to use the DataTrigger. My component is basically one ComboBox and I added 3 RadioButtons on the the top of it. Here's what I'm trying to do: I created an enum: public enum TipoTree {...

Problems with displaying an user selection from a Combobox in a Listbox

python,combobox,tkinter,listbox
I want the follow code snippet to take the user selection from the combobox and display it in a Listbox I have set up. When I run the code, and select from the combobox, the selection is displayed in the listbox as <tkinter.StringVar object at 0x1007ae748> instead of the actual...

ExtJS 4 Cannot render values in combo inside grid (cell editor plugin)

javascript,extjs,combobox,extjs4
I've been implementing some user interfaces for a while using Sencha ExtJS 4.2, I managed to do almost everything, but I'm facing some issues when trying to use a grid with a "cell editor" which is handled by a "combo box". The data object I'm using to display information in...

Value ComboBox Change Value Of TextBox In C#

c#,winforms,combobox
Hello experts i use this code Some time ago and is work ,but now is not work...!! it Says (Conversion failed when converting the varchar value 'System.Data.DataRowView' to data type int) the code is combobox select value change textbox with Details of this value And thank you in advance. public...

Conditional binding from view model to view in WPF using MVVM pattern

c#,wpf,xaml,mvvm,combobox
I am developing a WPF application using MVVM pattern. I have a combo in the view and two lists in the viewmodel (projects and organizations). Depending on the organizations list items I have to bind the the name of the organization or not. For example if the Count property of...

Change data according to selected item in combobox

vb.net,combobox,populate
I call into a function which runs a query into SQLServer and returns a DataTable with multiple columns. I want the data from the DataTable to change rows according to the selected item in the combobox. Dim dt As New DataTable Dim rInt As New Int32 dt = subGetDB() rInt...

Winforms comboboxes and parameterized stored procedure

c#,winforms,stored-procedures,combobox
In my tblSates Table, I have a column named Monat with these three values [01.2016, 02.2016 and 03.2016] and I want to fetch these values in a combobox. I am getting the values but just two of them instead of all three. Here is my code: private void FillCombobox2() {...

Restricting the input in DataGridView c#

c#,datagridview,combobox
So I have a DataGridView in a form, and I want to restrict adding data to its cell. I'm trying to make the cells of any added row a combobox, so that the user will have to choose the data for the cell from the combobox. Also when a user...

Populate Userform combobox from a given range on a mac (excel 2011)

excel,combobox,populate,userform
How do you populate a combobox with values from a given range on a mac. I have been searching for answers for the last hour but none of the solutions seem to be working. I have a userform called Details and a combobox called CurrencyList that I would like to...

How can I get the object value of a combobox in django view?

django,view,combobox
I am creating an app in django and to do that I have a form where the field 'Person' is a ForeignKey field. So, when I run the application it appears a form correctly showing me a combobox that lets me select the 'Person' object that I want. But the...

Invoke Combobox from PHP in HTML

php,html,json,combobox
I have a PHP file that parses a JSON list and feeds it to a combobox: <?php $jsonData = '{"marco":"[email protected]", "giovanni":"[email protected]"}'; $json = json_decode($jsonData, true); $opts = ''; foreach($json as $name => $email) { $opts .= '<option value="'.$email.'">'.$name.'</option>'; } echo ' <select name="Team1">'.$opts.'</select> <br> '; echo ' <select name="Team2">'.$opts.'</select> <br>';...

Binding ComboBox SelectedValue to string disables the default SelectedValue wpf

c#,wpf,binding,combobox,selectedvalue
I'm trying to bind a ComboBox SelectedValue to a string. The Binding works flawlessly. However, one of my ComboBoxItem's IsSelected is set to True, but for some reason when I launch the application, none of the items is selected, the SelectedValue is blank and I need to re-select the item...

Winform Combobox with DataSource as List

c#,winforms,combobox,datasource
This may be a very simple question but I realized I could not get it work. I have a Winform combo box with datasource as a List<int> combo.DataSource = intList; What do I put for .DisplayMember and .ValueMember in order to simply have a list of integer values? Not setting...

Parameter @code1 has no default value

vb.net,combobox
I'm creating this code to use two comboboxes, one that depends on the first, but when I'm trying to select the "code_Zone" from the Table "Zone" I have this exception: Parameter @code1 has no default value This is my code: Dim cmd3 = New OleDbCommand("select [Code_Zone] from [Zone] where [Nom_Zone]=...

How to get the appropriate ComboBox Tag

c#,wpf,combobox
I'm trying to get the Tag associated to a value of ComboBox like this way: var league = ((ComboBoxItem)this.League.SelectedValue).Tag.ToString(); Console.WriteLine(league); The compiler show me a Invalid Cast Exception I only want to get the associated Tag of the selected value by user, in particular: (combobox value and Tag) -Italy (item)...

compare items of 2 comboboxes

combobox,javafx,javafx-8
I want to compare the items of 2 comboboxes. Lets say combobox1 has the items ("a", "b", "c", "d") and combobox2 has the items ("b", "c"). I want to check the items and remove them from combobox1 if there is equality. So after comparison combobox1 should have the items ("a",...

Refreshing winform ComboBox datasource on closing a dialog form

c#,winforms,combobox
I have a settings form, on which there is a combo box that I fill with divisions from the database. Next to this combo box there is a "new" button the user can click to create a new division. When the New button is clicked, a dialog form pops up...

Combobox Validation Rule

c#,winforms,combobox
Hi people do you maybe help me with my question? I have a Form with combobox and Panel. I need when I selected in Combobox (item1 = yes,item2=no) item 2, panel make visible=false (with all item have), and items that are not visible in panel(radiobutton, textbox etc.) the table in...

How to dynamically create Sharepoint ComboBoxes?

c#,date,combobox,sharepoint-2010
I dynamically create Textboxes with C# in my Sharepoint project like so: boxRequestDate = new TextBox { CssClass = "dplatypus-webform-field-input", Text = DateTime.Today.ToShortDateString() }; ...but I need ComboBoxes (or their HTML equivalent), too, at times. How is that done? "ComboBox" is not recognized in Sharepoint. Surely there's a way to...

C# Forms Loading ComboBox Items on Startup

c#,combobox
public Form1() { InitializeComponent(); loadComboEmail(); } private void loadComboEmail() { string path = Directory.GetCurrentDirectory(); string build = (path + "\\" + "email.txt"); string[] lines = System.IO.File.ReadAllLines(build); comboEmail.Items.AddRange(lines); comboEmail.SelectedIndex=0; } I've got a combobox that I wanted to load with the client email addresses which are stored in an text file....

Display blank instead of first item in combobox

c#,.net,winforms,combobox
Code: cmbItemType.DisplayMember = "Text"; cmbItemType.ValueMember = "Value"; var items = new[] { new { Text = "Text1", Value = "1"}, new { Text = "Text2", Value = "2"} }; cmbItemType.DataSource = items; The above code displaying two items, but how to display a blank item in the field. Now at...

How to bind to a source inside a ListBox different from the ItemsSource already specified

c#,xaml,combobox,listbox
I have a ListBox inside a HubSection, whose Items are bound to a class "players" added to my DefaulViewModel via code behind. First I simply put a TextBox bound to the property "PlayerName" of my class "players". Now I would like to add a ComboBox with some items that are...

WPF - change the selected Item of one combobox to the selected item of another combobox

c#,wpf,combobox
I have two combo boxes in my .xaml file. I would call the first combobox "main combo box ". The other combobox also contains the same set of values as in the the first main combobox. When I change the selection in the first combobox, I want the selection of...

WPF ComboBox.ItemsSource goes into loop if data returned outside of Initialised

wpf,vb.net,combobox
If there is a change of data in one tab on a page we need to see the update if the user changes something and moves to another tab... This works perfectly with a Grid Private Async Sub Telephone_ReturnData() Try Dim DGV As CustomControl.DGVx = Prospect_Grid.FindName("Telephone_DGV") strSQL = "SELECT Prospect_TelephoneCalls.Transaction_ID...

Combobox Datasource assign to Datatable

vb.net,combobox,casting,datatable
How to convert Datasource of a Combobox to Datatable in VB.net? I know how to assign datatable to combobox. In this case I need to do it opposite way. Like: dim dt as DataTable = combobox1.DataSource Is this possible?...

How can I populate comboboxes from arrays?

c#,arrays,wpf,combobox,split
I a text file with names and phone numbers. My lecturer gave me a piece of code to split this into two arrays. Now I'm having trouble populating the name and phone number comboboxes with these arrays. All I get is errors saying array1 and array2 don't exist in the...

How do you disable a jQuery UI Combobox?

combobox,jquery-ui-autocomplete
I'm trying to disable a jQuery UI combobox I've created. I have searched, but come up with nothing that works yet. Here's some JSFiddle: ... $(function() { $( "#userInfo" ).combobox(); $( ".custom-combobox-input").attr("placeholder", "(Pay Band GS 1-15/rank)"); $( "#userInfo input" ).attr('disabled', true); $( "#userInfo button" ).attr('disabled', true); }); that I've programmed...

Very simple color picker made of combobox

c#,wpf,combobox
This is my xaml: <ComboBox Name="comboColors"> <ComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Rectangle Fill="{Binding Name}" Width="16" Height="16" Margin="0,2,5,2" /> <TextBlock Text="{Binding Name}" /> </StackPanel> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> And here is a population of combobox items in c#: comboColors.ItemsSource = typeof(Colors).GetProperties(); Now the question is - how to make this combo show its...

Reading c# combo box text and value?

c#,combobox
I wrote this code to save value and text into the combo box: public class ComboboxItem { public string Text { get; set; } public object Value { get; set; } public override string ToString() { return Text; } } ComboboxItem item = new ComboboxItem(); for (int i = 0;...

In a continuous form, can I have a combo box use a different query depending on a field or text box value within its own record?

sql,vba,ms-access,combobox,access-vba
Edit: for those wondering, it's apparently impossible to have the same combo box for two different records in a continuous form refer to two different queries to populate its list. I have a continuous form that has maybe 5 records. There is a combo box, Laborer1, and would like the...

Combobox not show the correct language values in struts1

forms,extjs,combobox,struts,struts-1
Im using ExtJS and Struts1 for an application, when user uses this app in english and displays the combobox (inside form), the selection is in another language (spanish) but not in english. After save the form and reload the page this parameter shows in english (but if user displays the...