C# : Autocomplete TextBox Column in the Datagridview With SQL Server

DTGTXTSQLAUTOfig.3This time, I will teach you how to create an AutoComplete TextBox Column in the Datagridview using C#.net and SQL server 2005 Express Edition. With this, you can auto-suggest and append the column of the Datagridview.


The database of this project is here.



So, Let’s get started.


1. Open Microsoft Visual Studio and create a new windows form application for C#. After that, add a Label and DataGridView in the form and it will look like this.


2. After that, go to the solution explorer and hit “View Code” to fire the code editor.


3. In the code editor, declare and initialize all the classes that are needed.

Note: Put ‘using System.Data.SqlClient;’ above the namespace to access sql server library.

5. Go back to the design view, double-click the and do the following codes for adding a TextBox in the Datagridview and establish a connection between SQL Server 2005 and C#.net.

6. Go back to the design view again and click the Datagridview. After that, go to the properties and hit the lightning symbol. Then, scroll down and find “EditingControlShowing” for the events. Double-click it to fire the event handler of it.


7. Do the following codes in the method to make the TextBox Column autoComplete.




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 : Autocomplete Text Box Column in the Data grid view 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
Upload Date and Time:July 9, 2016- 2:25 am

1 thought on “C# : Autocomplete TextBox Column in the Datagridview With SQL Server”

  1. Thank you for this code. Can you guide me for the code if i would like to search for matching any part while typing the letters to shorten the large data in datagridview text box column.


Leave a Comment