This tutorial is all about How to Change DataGridview Column Header text in VB.Net. In this post i will teach you How to Change DataGridview Column Header text in VB.Net. So let’s get started:
As a continuation of this tutorial. We will use the How to Format the DataGridview Column to Percentage using VB.Net
- First, Design your Form like this one below.
Add a Button.
- After designing the form. Click the Button and add this following codes.
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- DataGridView1.Columns(3).HeaderText = "Percentage"
- DataGridView1.Columns(3).DefaultCellStyle.Format = "p2"
- End Sub
- Then Click F5 to Run the Program.
As you can see, from the Header Text of Price it changes to Percentage.
If you have any comments or suggestions about on How to Change DataGridview Column Header text in VB.Net please feel free to contact Us on Our Contact Page.
Download Code Here
Readers might read also:
- How to Get Total Value in DataGridView Using V.Net
- Displaying Data Table records in DataGridview using VB.Net
- How to load Data From DataGridVIew to TextField