Search
In this tutorial I will teach you on how to display related record based on the selection value from a ComboBox.
The example displays a student’s subject in a DataGridView after a SelectedIndexChanged event of a ComboBox.
This tutorial assumes that you already know how to add a DataSet in your project.
The following are important steps in order to understand how I made this simple program.
1. Bind a ComboBox
2. Add a query in the Course Table under DataSet designer
3. Edit DataGridView columns after binding from Data Source
4. Select only the following field by removing unnecessary columns
5. In the SelectedIndexChanged event of the ComboBox use the FillBy method instead of Fill method
As you can see in the DataSet designer there are two fill method in a Course table name Fill and FillBy. FillBy has a parameter named StudentID. This will tell our TableAdapter to filter the record using the FillBy method.
Download Code
- 6415 reads
Relevant Content
- How to Configure ComboBox in DataGridView
- ComboBox in DataGridView
- Export Datagridview to Excel
- Setting Text Programmatically of a Databound TextBox
- How to Add-Update-Delete Record Using MySQL
- CheckBox in DataGridView
- How to Bind Data to the Windows Forms DataGridView Control
- Windows Forms - ComboBox Control
- Extracting Noun From Text Files
- Student Form








How to make design
Hi admin am beginner, and gusto ko sana pano gumawa ng design
for online reservation.
salamat po ng marami.
God bless you.
kimy
vb .net
how to add the data grid values to a ms access table in vb.net
sir jay
pls help us make a comuterized cashier system
vb and oracle
Hello SIr,
I want to develop a school management system using vb at front end and oracle as back end.Can u tell me some initial steps so that i could handle oracle without any problem?
Note:I dont know very much about using oracle.Can I develop it by only using sql server 2000/2005?
Sir Jay
I often find the member of this forum asking the programmer to convert their program to VB6 from the higher version. I think it is better if those who ask upgrade their software to higher version. You can get the Visual Studio 2008 by downloading from torrent or just buy it in the shop. I'm sure the price is not expensive because mostly they are pirated.
re: Sir Jay
Yes that's true. But some people is asking to downgrade the source code is due to the fact that their professor is still using VB 6.0 in their class. One reason is their computer may be cannot meet the specs of VB.NET.
For now I prefer to work with VB.NET as it has a lot of changes that makes coding easier and faster.
re: Sir Jay
I think if is so, then they may give a try to REALbasic. I just this this software. It's good and almost similar to VB, yet more powerful. This software is cross-platform. The coding is simple and you can convert the VB code to this software too. Just try it.
Get value from database based on combox
sir can you plz help me in combox view how to show value in datagrid view my email id is (link_atif@yahoo.com)
Display Record in DataGridView Based on ComboBox Selected Value
It is good to have this tutorial. But can you help me, how to display none in the combobox when it is loading, so that if the data is bigger the application can start quickly?
One of the approach if you
One of the approach if you have a lot of record to bind in a ComboBox is to filter the record based on the character that you have type in a combobox. This can be done in the Change event of a combobox.
One of the approach if you
Oh thanks for the suggestion. Can you give example? Just say I have four categories/items building, car, animal and electronic.
I have not tried yet, but in my point of view, if the future we want to add some more categories/item, to the database, I think we would find difficulty. Don't you think so?
Sir Jay
Sir Jay
How to convert .net to vb6?
re: Sir Jay
I don't have much time converting this to vb 6 for now.
Post new comment