?
Solved

formatting gridView columns

Posted on 2006-06-10
1
Medium Priority
?
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
Edwin_C earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 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