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
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.
Double-click "DataGridView" to add a data grid to your form. Right-click the data grid control and click "Edit Columns."
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."
Click "Close" and click "OK" to view the data grid in form view.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for