samsmithnz
Senior Contributor
I have a datagrid with a right aligned column like this:
But the data in the column seems to right align with an invisible margin (see attached screenshot). any ideas why???
Code:
<ASP:TEMPLATECOLUMN headertext="invoice_amount" sortexpression="invoice_amount" itemstyle-cssclass="datagrid">
<HEADERSTYLE horizontalalign="Right"></HEADERSTYLE>
<ITEMSTYLE width="80" horizontalalign="Right"></ITEMSTYLE>
<HEADERTEMPLATE>
<ASP:IMAGEBUTTON id="btnSortAmount1" runat="server" imageurl="images/mailbox_amount.gif" commandname="sort"
commandargument="invoice_amount"></ASP:IMAGEBUTTON>
<ASP:IMAGEBUTTON id="btnSortAmount2" runat="server" imageurl="images/mailbox_arrow_off.gif" commandname="sort"
commandargument="invoice_amount"></ASP:IMAGEBUTTON>
</HEADERTEMPLATE>
<ITEMTEMPLATE>
<A HREF='InvoiceDetails.aspx?InvoiceID=<%#DataBinder.Eval(Container.DataItem, "invoice_id")%>'><%# DataBinder.Eval(Container.DataItem, "invoice_amount","{0:#,###,##0.00}")%> <%# DataBinder.Eval(Container.DataItem, "invoice_currency_code")%></A>
</ITEMTEMPLATE>
</ASP:TEMPLATECOLUMN>
But the data in the column seems to right align with an invisible margin (see attached screenshot). any ideas why???