Link to home
Start Free TrialLog in
Avatar of Adnan
AdnanFlag for Norway

asked on

DataGridView Column Header Alignment

I've found a lot of answers on how to align the Header Text for a column but when I set the HeaderText to MiddleRight alignment, there is some sort of padding after the Header text that I can't figure out how to get rid of.  Since this is hard to describe, I've posted a sample picture with the problem
dgvUndoImportInfo.Columns[0].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleLeft;
            dgvUndoImportInfo.Columns[1].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
            dgvUndoImportInfo.Columns[2].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
            dgvUndoImportInfo.Columns[3].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;

Open in new window

undo.png
ASKER CERTIFIED SOLUTION
Avatar of ninusajil
ninusajil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adnan

ASKER

you can se the column "Sum imported" , alignment on this column is set to middlerigth, but still there are some space after the text.....i hope u understand it now...take a look at the picture...