Answers
Apr 04, 2007 - 12:59 PM
Cheers
Peter
Apr 04, 2007 - 01:25 PM
I forgot to say that it's windows forms, not asp.net, so the solution doesn't work unfortunately.
Apr 04, 2007 - 01:36 PM
For a windows app, look at RowTemplate property of the GridView component, expand the sub nodes and click on the [...] for DefaultCellStyle. This will open the CellStyle Builder. Set the Alignment property in the Layout section.
Cheers
Peter
Apr 05, 2007 - 02:00 AM
I found that the equivalent by code is:
this.dataGridView1.Columns["CustomerName"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
and the points go to..... Peter!!! :)
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
About Quomon
Quomon is a network of IT professionals from around the world, collaborating by sharing knowledgeable answers in their specific field of expertise.
Please wait...
Add New Comment