Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
# how to align DataGridView Data in center and how to align the heading of the column also in Center.
Posted

Columns - in the designer click on the property ColumnHeadersDefaultCellStyle and select Layout, Alignment = MiddleCenter

For the data fields do the same for DefaultCellStyle
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-May-15 11:17am    
Sure, a 5.
(But I later noticed that the question is incomplete. The inquirer may also need to set the row style or cell style. This is way too trivial but... I answered in Solution 2.)
—SA
Shaik Izaz 28-May-15 11:24am    
How to align the data in cells in middle center
Sergey Alexandrovich Kryukov 28-May-15 11:30am    
I answered in detail in Solution 2.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900