|
Question : How to Right Justify DataGridView Column
|
|
Good Day:
I am using VS.NET 2005, VB.NET, and the DataGridView. I would like to format a column to be right justified using the DataGridView control. Currently my code is as follows:
column = New DataGridViewTextBoxColumn() column.DataPropertyName = "ExtendedPrice" column.Name = "Extended Price" Me.grdSODetail.Columns.Add(column) Me.grdSODetail.Columns("Extended Price").DefaultCellStyle.Format = "#,###,###.00" grdSODetail.Columns("Extended Price").Width = 60
Any Suggestions? Thank You, Denise
|
|
Answer : How to Right Justify DataGridView Column
|
|
Me.grdSODetail.Columns("Extended Price").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
|
|
|
|