On the data grid properties, edit the TableStyles collection. Add a new style or edit an existing one if there is one. Click on the GridColumnStyles collection node edit button. There should be a down arrow next to the Add button, click this and select datagridtextboxcolumn. Near the bottom of the propertygrid there is an alignment attribute. That's the one u want.
see my attachment.
i want to put the headertext in the datagrid to be in the center of the column.
and oh. there is no property of headertext.center
Dim first As New DataGridTextBoxColumn()
first.Width = 100
first.MappingName = "First_Name"
first.HeaderText = "First Name"<-------- i want this to be in center of the column.
first.NullText = ""
ok i try your suggestions but sorry to tell you this it wont work..
it is just like:
Dim address As New DataGridTextBoxColumn()
address.Width = 100
address.MappingName = "Address"
address.NullText = ""
address.HeaderText = "Address"
address.Alignment = HorizontalAlignment.Center<------it is just put the cursor in the middle of the column and not the headertext(address).