Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right justify in GridView
Message
From
12/07/2006 09:38:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/07/2006 09:26:37
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01135660
Message ID:
01135663
Views:
11
>I have a GridView in an ASP.Net WebForm. This grid contains a numeric column that I would like to show as right justified so that the numbers in the column line up correctly.
>
>Is there a way to do this?
>
>Thanks,
>
>Jerry

Add:
ItemStyle tag with HorizontalAlign="Right"
ie: (Switch to source view)
  <asp:BoundField HeaderText="Quantity" 
     DataField="Quantity" SortExpression="Quantity" 
      DataFormatString="{0:d}">
      <ItemStyle HorizontalAlign="Right"></ItemStyle>
  </asp:BoundField>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform