Loading

combobox

Submitted by: 

Last year, in March 2010, I started writing a comprehensive school management application that I called SMART (School Management Application for Registrars and Teachers)
This was in VB6 with SQL ADO and Microsoft Jet (Database engine of Access)
I challenged myself and I am now migrating to VB.Net and SQL Server.

I feel it would be necessary to create a tutorial on how I program the ComboBox in DataGridView. So, this tutorial will guide you on how to:

  1. Add DataSet
  2. Create a master/detail form
  3. Add ComboBox in DataGridView

How to add a DataSet

1. Click on the Data Sources.

2. Click Add New Data Source.

Submitted by: 

Learn how master/detail form works in Visual Basic .NET 2008. The detail form or the DataGridView control contain a ComboBox that looks up record from Products table.

For the tutorial please read How to Configure 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

Submitted by: 

This program will use the database from the previous source code called DataGridView Control with MySQL. You can use this program without downloading the previous source code by importing the SQL file to the northwind database.

If you like you can use different name for the database. Just make sure to change the connection string to the name you choose.

Language: 

This tutorial is part of Database Programming Made Easy Series.

[inline:Windows Form - ComboBox Control.jpg=ComboBox Control]

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.

Previous: TextBox Control Using Datasets and Data Adapters

Submitted by: 

Here's another version of lynxgrid that I have developed. But by this time I have added a multi-column combobox.

The primary purpose of this code is to learn how to integrate combobox and other control like datepicker, checkbox, etc. in lynxgrid. You will also learn in different way on how to save using a master/detail form. How to delete record in table which was deleted in lynxgrid control.

Note: I'm using the term combobox instead of datacombo or something else which I'm actually using in this code because combobox in datagrid is most common term.

Submitted by: 
Language: 

A powerful grid which was abandoned by the original author (Richard Mewett). As what Morgan Haueisen said "this grid is too good to let die". Now I want to support this grid as most of my application is using this for my master/detail and or parent/child form. This grid can support also any control which in my case I added a multi-column combobox.

Pages