A simple class to populate and reset a listbox and a combbox
- Read more about A simple class to populate and reset a listbox and a combbox
- 3 comments
- Log in or register to post comments
- 86 views
I feel it would be necessary to create a tutorial on how I program the ComboBox in DataGridView.
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
[inline:ComboBox_Data_Binding.jpg=Bind a ComboBox]
2. Add a query in the Course Table under DataSet designer
This tutorial is part of Database Programming Made Easy Series.
With few modification from the previous tutorial you will learn how to fill combo box with data.
I am using Datasets and Data Adapters to connect to our database.