Make of the Gridview Column Center and Right Align (MiddleRight)

How about aligning them to the right using

ItemStyle-HorizontalAlign="Right"

and then using CSS padding to add some space around the edge of the value in the cell?


Above accepted answer did not work for me. Although i did not try it in code as per above answer, i tried using the equivalent in the aspx page (which did not work).

<asp:BoundField etc>
  <ItemStyle etc />
  <HeaderStyle HorizontalAlign="Right" />
</asp:BoundField>

What worked for me was

<HeaderStyle CssClass="colHeader-RightAlign" />

and created a style within the <head>

<style type="text/css">
    .colHeader-RightAlign {
        text-align:right !important;
    }
</style>