Solved

formatting gridView columns

Posted on 2006-06-10
1
260 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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…

717 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