954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Listview, Column alignment CENTER

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)
yorro
Junior Poster
121 posts since Aug 2009
Reputation Points: 8
Solved Threads: 7
 

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)
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Thanks

yorro
Junior Poster
121 posts since Aug 2009
Reputation Points: 8
Solved Threads: 7
 

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

madhavan.rvs
Newbie Poster
1 post since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You