Solved

formatting gridView columns

Posted on 2006-06-10
1
257 Views
Last Modified: 2012-06-22
How would I go about getting a column in a GridView to always show a dollar sign *all the way to the LEFT of the column*.  Right now the content of it is right justified, but I would like to put a dollar sign all the way to the left.  Thanks.
0
Comment
Question by:ARACK04
1 Comment
 
LVL 16

Accepted Solution

by:
Edwin_C earned 500 total points
ID: 16879671
It can be done using a label control inside a template column.

<asp:TemplateField HeaderText = "Amount">
    <ItemStyle HorizontalAlign="right" />
       <ItemTemplate>
          $<asp:Label ID="lblAmt" runat="server" Width="100px" Text='<%# Eval("amt", "{0:N2}") %>'></asp:Label>
       </ItemTemplate>
</asp:TemplateField>

Hope that helps
Edwin
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question