Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

grid alternating row background color Options
Kevin
Posted: Wednesday, May 17, 2017 6:13:10 PM
Rank: Member
Groups: Member

Joined: 3/7/2017
Posts: 16
Is there a way to have a grid use a different color on alternating rows, for readability?
eo_support
Posted: Thursday, May 18, 2017 11:24:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,598
Yes. You would set this property:

https://www.essentialobjects.com/doc/eo.web.griditemstyleset.alternatingitemstyle.aspx

Normally only the ItemStyle property is set:

https://www.essentialobjects.com/doc/eo.web.griditemstyleset.itemstyle.aspx

In that case all items will use ItemStyle. However if you set both ItemStyle and AlternatingItemStyle, then the items (rows) will use the two styles alternatively.

Thanks
Kevin
Posted: Thursday, May 18, 2017 1:59:25 PM
Rank: Member
Groups: Member

Joined: 3/7/2017
Posts: 16
As soon as I add either an ItemStyle or AlternatingItemStyle, when I go to edit a cell, the edit box appears to be floating somewhere above the cell I just clicked on. This is what I have:

<eo:GridItemStyleSet>
<ItemStyle CssText="padding-left:8px;padding-top:2px;text-align: left;background-color: #FFFBD6;"></ItemStyle>
<AlternatingItemStyle CssText="padding-left:8px;padding-top:2px;text-align: left;background-color: #FFFFFF;"></AlternatingItemStyle>
<CellStyle CssText="padding-left:8px;padding-top:2px;text-align: left;background-color: #FFFFFF;"></CellStyle>
<FixedColumnCellStyle CssText="border-right: #d6d2c2 1px solid; padding-right: 10px; border-top: #faf9f4 1px solid; border-left: #faf9f4 1px solid; border-bottom: #d6d2c2 1px solid; background-color: #ebeadb; text-align: right"></FixedColumnCellStyle>
</eo:GridItemStyleSet>
eo_support
Posted: Friday, May 19, 2017 8:48:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,598
Hi,

You should not set paddings on ItemStyle/AlternatingItemStyle. You can set paddings on CellStyle.

Thanks!


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.