Hi,
Change the alignment of the default cell style for the column.
Dim strConn As String
Dim da As SqlDataAdapter
Dim conn As SqlConnection
strConn = "Server = .;Database = AdventureWorks; Integrated Security
= SSPI;"
conn = New SqlConnection(strConn)
da = New SqlDataAdapter("Select * from HumanResources.Employee",
conn)
da.Fill(ds, "Employee")
DataGridView1.DataSource = ds.Tables("Employee")
DataGridView1.Columns("ContactID").DefaultCellStyl e.Alignment =
DataGridViewContentAlignment.MiddleRight
Ken
--------------------------------
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi
For numeric columns I want to align it to the right
How can I do that?
Samuel