Rank: Member Groups: Member
Joined: 3/7/2017 Posts: 20
|
Is there a way to have a grid use a different color on alternating rows, for readability?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Yes. You would set this property: https://www.essentialobjects.com/doc/eo.web.griditemstyleset.alternatingitemstyle.aspxNormally only the ItemStyle property is set: https://www.essentialobjects.com/doc/eo.web.griditemstyleset.itemstyle.aspxIn 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
|
Rank: Member Groups: Member
Joined: 3/7/2017 Posts: 20
|
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>
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You should not set paddings on ItemStyle/AlternatingItemStyle. You can set paddings on CellStyle.
Thanks!
|