0

My first column does not align to center, although the sub-columns aligns perfectly

Listview1.Columns.Add("Column1", 100, HorizontalAlignment.Center)
Listview1.Columns.Add("Column2", 100, HorizontalAlignment.Center)
Listview1.Columns.Add("Column3", 100, HorizontalAlignment.Center)
4
Contributors
4
Replies
9
Views
8 Years
Discussion Span
Last Post by ImZick
1

You can't change the alignment of 1st column.

Listview1.Columns.Add("",0, HorizontalAlignment.Center)
Listview1.Columns.Add("Column1", 100, HorizontalAlignment.Center)
Listview1.Columns.Add("Column2", 100, HorizontalAlignment.Center)
Listview1.Columns.Add("Column3", 100, HorizontalAlignment.Center)
ListView1.Columns.RemoveAt(0)
Votes + Comments
:)
0

I have struggled lot to resolve this issue finally using this code, I have done. Thanks a lot dude.

0

Thanks for the Codes. I'm new in VB.net and finding Daniweb solves some of my problem :D

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.