Populate Combobox Based On Value Other?

Aug 31, 2011

I have a combobox wich I want to populate based on the value of another combobox.[code

View 2 Replies


ADVERTISEMENT

Wpf - Populate ComboBox Based On Another ComboBox Using XAML?

Jul 29, 2011

I have two ComboBoxes

<ComboBox Name="cmbMake" DisplayMemberPath="MakeName" SelectedValuePath="MakeID"/>
<ComboBox Name="cmbModel" DisplayMemberPath="ModelName"/>

I use LINQ-to-Entities to populate the cmbGroup ComboBox

Dim db as myDataEntity
cmbGroup.ItemsSource = db.Makes

How do I populate my second ComboBox (cmbModels) based on the selection of the first ComboBox (cmbMake) using XAML so that whatever I select in the first ComboBox automatically filters the ItemsSource in the second ComboBox?

View 3 Replies

Populate 2nd Combobox Based On 1st's?

Dec 13, 2010

How do i populate my state combobox,such that when i select the appropriate country my combobox will automatically display the appropriate state?

View 7 Replies

Populate Combox Based Upon Selection Of Another Combobox?

May 17, 2012

I'm new to programming and I'm using vb.net 2010 and I'm stuck with this problem. So here are the details, I have 2 tables in my database, a product table and a category table. In my product table I have product no, product description and category no. In the category table i have category no and category desciption. So this is where Ive been stuck for the entire day, I want my combox(product) to populate based on what is in the combobox(category). For example I have "Chair" in my combobox(category), then what would appear in the combobox(product) would be "sofas", "dining chair" etc.'the part below is where the program will read the category description from my database

Sub fillcomboDesc()
Dim fillcatDesc As MySqlCommand = New MySqlCommand("Select catDesc from category;", connection)

[code]....

View 2 Replies

Populate Text Box Based On Value Selected On Combobox?

Sep 13, 2011

I have the following code which add items to a combobox in my form:

Public Class Contas_Bancarias Private Sub Contas_Bancarias_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim conn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:BDadosBANKREC.accdb;Persist Security Info = False"

[Code]...

View 5 Replies

Populate Textbox Based On ComboBox Selection Not Using Databinding

Apr 27, 2010

I have a form, frm1 w/a combobox, cboLocations, which is being populated using a sql string. There is also a frm2 w/a series of textboxes and other comboboxes. I want it so that once a selection is made from cboLocations, the textboxes and comboboxes on frm 2 are populated with the corresponding data. Here is what I have so far:

frm1:
Public Class frmLocations
Dim conn As New SqlConnection("Data Source=f03d3s-dev01; Initial Catalog=dos_track;User Id=vbuser; Password=tran3;")
Dim depot_refnbr As Integer
Private Sub frmLocation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn.Open()
[Code] .....

What's happening right now is that I make a selection from cboLocations on frm1 and click on the OK button, frm2 loads, but none of the textboxes are populating and one of the comboboxes, cboDepot, shows the different data when you click on the down arrow, but it's not displaying anything it its text field when frm2 loads.

View 14 Replies

Forms :: Populate Textboxes Based On Combobox Selection NOT Using Databinding?

Apr 27, 2010

how to go about this? I have a form, frm1 w/a combobox, cboLocations, which is being populated using a sql string. There is also a frm2 w/a series of textboxes and other comboboxes. I want it so that once a selection is made from cboLocations, the textboxes and comboboxes on frm 2 are populated with the corresponding data. Here is what I have so far:

frm1:
Public Class frmLocations
Dim conn As New SqlConnection("Data Source=f03d3s-dev01; Initial Catalog=dos_track;User Id=vbuser; Password=tran3;")
Dim depot_refnbr As Integer

[Code]...

What's happening right now is that I make a selection from cboLocations on frm1 and click on the OK button, frm2 loads, but none of the textboxes are populating and one of the comboboxes, cboDepot, shows the different data when you click on the down arrow, but it's not displaying anything it its text field when frm2 loads.

View 4 Replies

VS 2008 - Populate Master / Detail Datagridviews Based On A Combobox Selection?

Apr 14, 2009

I have a product table with ProductId,ProductName,ProductCode as fields. I've populated a combobox with productnames. Next I have two other tables called Result_Header and Result_Detail. The Result_Header table has ProductId as a foreign key and BatchNo,TestDate etc. The Result_Detail table has ResultId as a foreign key which is the ResultHeaders Primary Key and other fields such as Result,SpecHi etc. What I need is when I select a Product from my combobox my two datagridviews must be populated via the Result_header and Result_detail tables respectively.

View 20 Replies

VS 2010 Populate Textbox With Excel Data Based On Combobox Selection?

Nov 29, 2011

Visual Basic 2010 Express: I have a form with a combobox that is populated with the names of locations from a datagrid which in turn was imported at run-time (Form_Load) from an Excel database. The Excel database (and the datagrid) also stores the information for addresses and phone numbers for their respective locations.

What I would like to do is have the phone number and address text boxes automatically be updated with the proper corresponding data when the user selects a location from the combobox. Whether the text boxes are updated from the datagrid or Excel database is not a concern; I'm mainly looking for whichever way is simpler.

View 3 Replies

Populate Combobox With Database, Select To Populate Second Combobox?

Jan 27, 2011

I need to pull from an access database to populate a combobox. Then from there I need to have a second combo box populated depending on the selection in the first box. My thought of an example would be a website that is setup for selecting car make, modle,year...can that be done in VB?

View 1 Replies

Dynamicaly Refresh Databound Combobox Items Based On Selected_index_changed Event Of Another Combobox?

Jan 27, 2010

I am using VB.NET together with ADO.NET to create a program. I have set my TableAdapters as needed and bound the correct tables-columns to my comboboxes.My problem though is this:My combobox2 item is bound to a datatable. The table adapter's Fill method (the select command basicaly) includes a public variable in the where clause to fetch the correct results. I ll put some code here to clarify it a bit more.Public Class Frm_inv

[Code]...

View 5 Replies

Change List Of Combobox A Based On Item Chosen From Combobox B?

Jun 17, 2011

I am new to vb.net and I am using visual studio 2010. I have two comboboxes on a form, each combobox is set to DropDownList so that a list of items can show in the combobox, but no text is allowed to be entered.

For combobox A, if user chooses item 1, the list of combobox B should be updated accordingly. I think this is quite common on a lot of applications. But I do not know to implement it. I even do not know the keyword to search for the relevant property or event handler.

View 1 Replies

Datagrid - Filter Combobox In A Datgrid Based On Another Combobox

Oct 19, 2010

I think my question is discriptive, or as Microsoft in the Documentation for Data Grid the question is, How do I have a combo box column display a sub set of data based upon the value of a different combo box column?

[Code]...

View 1 Replies

Have One Combo Box Populate Another Based On Selection?

Jun 22, 2010

I am currently stuck in one part of my application. I have two combo boxes that i am having the users select from. The first combo box is simply bound to a datatable. that is working properly. The second one i need to populate off another datatable after sorting out what the first one is requesting. Basically it's choosing a line number on the first box and then selecting the machine associated with that line number.[code]...

View 4 Replies

Populate A Menu Based On A XML Document?

Mar 28, 2011

I know that I can populate a menu using a .INI file but I was wondering if it can be done using an XML file. I would like to be able to add parent and children menu items.

Below is a sample of what I want my XML to look like.

<?xml version="1.0" encoding="utf-8" ?>
<!--
MENU only needs an ID

[Code].....

View 1 Replies

Populate Combobox From Selection Of Another Combobox?

Jan 1, 2012

I currently have a form with two comboxes. The first cbo is being populated with a project number, which is being pulled from the first column of a spreadsheet. I now want the second cbo to read the first cbo and then find that project number on the spreadsheet; when it finds that project number, I then need it to copy data from the row the project number is on. I have converted to vb from vba. Below is the code I used in vba (which obviously does not work). I only need certain cells from the project row.

Dim proj_num, rng As Range
Dim data, i As Long, j As Long
With Sheet1

[code].....

View 20 Replies

ASP.Net Auto-populate Field Based On Other Fields?

Nov 15, 2010

how i can implement below requirement using asp.net and vb.net.I have three fields in a form which are filled by users. Based on these three values, i need to auto-populate the 4th field.I have planned to implement this in the following way.Write a separate class file with a function to calculate the possible values for the 4th fields based on 1st 3 inputs. This function can return some where between 1-10 values. So I've decided to use drop-down for 4th field, and allow users to select the appropriate value.Call the above function in onchange function of 3rd field and take and use the return values to populate the 4th field. I'm planning to get the return values in array field.(Does this need a post back?)

View 3 Replies

Populate Datagridview Based On Selected Records From Another Dgv

Apr 17, 2009

Have populated a dgv with records from a database. I have created a button >> which needs to transfer all the selected records from dgv to dgv2. Any tips on how to accomplish this ?

[code..]

At this point all is good. Now not sure on how to do next bit.

View 10 Replies

.net - Populate An Array Of Object Based On DataReader Data?

Jun 30, 2010

I am not sure how to phrase my question properly but I want to achieve something like this.

I have a class named Products public class Products

private ID as Integer
private Name as String
Public Property ProductID()
Get
Return ID

[Code]...

When I do the same, I am getting an error "Object Reference Not Set to an Instance of an Object.

View 1 Replies

Populate A Dropdownlist Based On The Changed Event In Another Dropdown

Aug 28, 2009

I want to populate the dropdownlist ddVerantwortlich1 with the people with the proper credentials based on the selected process step ddProzesss chritt1.It doesn't work if I want to change it using datasource and databindi have to manually loop through the table in the dataset returned from the query. then it works. but not otherwise.[code]

View 1 Replies

Populate A GridView With Query Based On TextBox.text?

Aug 15, 2011

I have a form which populates a TextBox I want to use the textBox.text to then load a gridView with the results

[code]...

View 13 Replies

Populate Text Boxes With Data Based On Redirect From Another Page?

Jun 16, 2011

This task is a little out of my reach so i dont even really know where to start...I want a user to click the command field "select" in my gridview. I then want them to be redirected ( response.redirect()) to an input form that will have its various asp.net text boxes filled with data from that selected item. I also need the ability to do this logical process:

IF the form is loaded from user
selecting item in gridview THEN
''Populate controls with data from selected gridview item Else Load

[code].....

View 1 Replies

Populate One Combobox From Another?

Jul 23, 2009

I select first value from a combobox1 but combobox2 was not populated corresponding to value selected from first one. Again I select same value now combobox was populated

View 2 Replies

Update, Append, Delete And Populate The Records To The Various Files Based On Two Distinct Fields, Column A & F?

May 18, 2010

Currently working on a project to automate the input based on the Summary file (xls format)

1. I want to be able to do the following: update, append, delete and populate the records to the various files based on two distinct fields, column A & F (see attached file).

2. Researched the process, requires knowing VB codes, are you familiar with this language? If so, how can I simplify the process? Please advise.

3. The files will reside on the SPP.

View 6 Replies

Combobox To Populate Textbox?

Apr 20, 2010

I am trying to display an ID which is a primary key in my table by selecting the corresponding name in my table. the names have been saved in a combo box and depending on the name selected the textbox will display that Id. the code I have so far only gets the names from sql server but doesnt show the corresponding id in the textbox. I have been searching and cant find anything similar to this.

this is the code for combobox. i placed it in the formload

[Code]...

View 11 Replies

Combobox To Populate Textbox?

Jun 21, 2010

I am trying to display an ID which is a primary key in my table by selecting the corresponding name in my table. the names have been saved in a combo box and depending on the name selected the textbox will display that Id. the code I have so far only gets the names from sql server but doesnt show the id in the textbox.

this is the code for combobox. i placed it in the formload

Public Sub RtnCmbVal()
Dim conn As SqlConnection
Dim str As String = "select ConsultantId, FullName from Derma_Consultants"

[Code].....

View 7 Replies

How To Populate ComboBox From INI File

Jan 12, 2010

I can understand since .ini files are pretty outdated, but I'll explain. I have a combo box, and inside the combobox I want it to display the names in a section of the .ini file. So say my .ini file contains the following:

[SECTION1]
Name = Billy
Lastname = Bob

Inside the combobox I wan't it to display the items "Name ", and "Lastname " only, not the section or the values.

View 1 Replies

How To Populate ComboBox Without Using Database

Jan 21, 2009

I want to populate a combo box but not using a database
e.g. combobox displays
red
white
blue

But want I want is if a person chooses red I want to pass back the number 1 value to a backend database. I'm able to populate a combo box with the colours but not sure how i 'grab' the value to pass back
Dim colours as string[] = new string[] { "red", "white", "blue" }
m_cmbColours.Items.AddRange(colours)

What I want is this
value Colour
1 red
2 white
3 blue

Combobox just displays the colours and when chosen in the combo box I grab the value corresponding to colour chosen.

View 4 Replies

Populate A Combobox Display?

May 24, 2011

I want to have a combobox, but I have two fields from my Access table that I want to display in my Combobox. I want to show the entire row in the combobox. Do I need use an asterisk at the line for adding items to the combobox? [code]...

View 5 Replies

Populate A ComboBox Using SqlDataReader?

Nov 16, 2007

I am a beginner in VB.Net. I have a table tblName; which consist of columns 'Name' and 'ID'. I want to populate the comboBox, where displaymember = 'Name' and ValueMember = 'ID'. In short, when a user selects a 'Name', return value should be the 'ID'. I can do it using DataAdapter. Another way of doing is; using a Listbox in parralel with the comboBox, which will be hidden, to save the 'ID' .

[Code]...

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved