Welcome Guest Search | Active Topics | Sign In | Register

Just SIMPLY align my Numeric fields RIGHT in their cell Options
gollnick
Posted: Thursday, May 3, 2018 1:31:19 PM
Rank: Member
Groups: Member

Joined: 11/13/2014
Posts: 15
Hello .. I am looking for a VERY SIMPLE way to align my numeric field TO THE RIGHT in their cells. Columns are defined DataType="Integer" and have their DataFormat="{0:N2}
I just want them to align RIGHT

gollnick
eo_support
Posted: Thursday, May 3, 2018 5:57:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

The easiest way is to use CellStyle. For example, in the EOWebDemo application, in Demos/Grid/Design/Style1, you can change the "Posted At" column to right align by changing:

Code: HTML/ASPX
<eo:StaticColumn HeaderText="Posted By" DataField="PostedBy" ></eo:StaticColumn>


To:
Code: HTML/ASPX
<eo:StaticColumn HeaderText="Posted By" DataField="PostedBy" >
    <CellStyle CssText="text-align:right" />
</eo:StaticColumn>


Note that the additional CellStyle attribute added.

Thanks!
gollnick
Posted: Thursday, May 3, 2018 6:25:47 PM
Rank: Member
Groups: Member

Joined: 11/13/2014
Posts: 15
Thank you. How do you close this?
eo_support
Posted: Thursday, May 3, 2018 6:40:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Close what?
gollnick
Posted: Thursday, May 3, 2018 7:17:11 PM
Rank: Member
Groups: Member

Joined: 11/13/2014
Posts: 15
This topic. Case closed
eo_support
Posted: Thursday, May 3, 2018 7:19:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Oh. You can just leave it. :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.