Change DataGridView Column Header Text - Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

This tutorial will show you how to change DataGridView column header text:

In this case we will change the third column header text in the picture below to Percentage:

Code:

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        DataGridView1.Columns(2).HeaderText = "Percentage"
        DataGridView1.Refresh()
End Sub

Result

change datagridview column header text


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.