Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

formatting gridView columns

Posted on 2006-06-10
1
Medium Priority
?
262 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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