How to Add a Textbox & Button to the DataGrid

Written by jaime avelar
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Add a Textbox & Button to the DataGrid
Create a Windows Forms Application in VB. (John Foxx/Stockbyte/Getty Images)

Adding a "TextBox" column and a "Button" column to a data grid view control in Visual Basic.NET (VB.NET) can provide users additional ways to filter data. The "DataGridViewTextBoxColumn" class allows you to add text boxes to a data grid and lets the user enter text strings. In addition, the "DataGidViewButtonColumn" class allows you to add buttons to a column which the user can press for filtering or to display information about the current row selected.

Skill level:
Moderately Easy

Other People Are Reading

Things you need

  • Microsoft Visual Studio

Show MoreHide


  1. 1

    Launch Microsoft Visual Studio, click "New Project" from the left pane of your computer screen and expand "Visual Basic" below "Installed Templates." Click "Windows" and double-click "Windows Forms Application" from the centre of the dialogue window to create a new project.

  2. 2

    Double-click "DataGridView" to add a data grid to your form. Right-click the data grid control and click "Edit Columns."

  3. 3

    Click the "Add" button. Click "DataGridViewTextBoxColumn" next to "Type" and click "Add." Choose "DataGridViewButtonColumn" to insert a button column to the data grid and click "Add."

  4. 4

    Click "Close" and click "OK" to view the data grid in form view.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.