C# : Filling Data in the Datagridview Based on ComboBox with SQL Server



In this tutorial, I’m going to show you how to fill the data in the Datagridview based on Combobox using C# and SQL Server. The process of this method is very simple, wherein you can easily retrieve the list of records that you have saved in the database and be loaded into the list control of a Combobox in the Datagriview.


These are the following steps:

note : For the database of this project just click here.

Step 1. Open Microsoft Visual Studio and create a new windows form application in C#. Then, drag a DataGridview on the form.


Step 2. Go to the solution explorer, click the “code view” to display the code editor.


Step 3. Declare and initialize all classes that are needed.

Step 4. Create a method for filling data in a ComboBox.

Step 5. Go back to the design view, double-click the form and do the following codes for setting up the connection between SQL Server 2005 Express Edition and C#.Net. Then, call the “LoadCombo” method that you have created.



For all students who need a programmer for your thesis system or anyone who needs a source code in any a programming languages. You can contact me @ :



Email – [email protected]
Mobile No. – 09305235027 – TNT


Download Source Code

Project Name : Filling Data in the Datagridview Based on ComboBox with SQL Server
Project Platform :C#
Programming Language Used:C# Programming Language
Developer Name :itsourcecode.com
IDE Tool (Recommended):Visual Studio 2019
Project Type :Desktop Application
Database:MySQL Database
Upload Date and Time:June 30, 2016- 5:28 am

Leave a Comment