Welcome Guest Search | Active Topics | Sign In | Register

grid cell border-bottom not showing Options
Joan Darling
Posted: Monday, May 23, 2016 12:32:21 PM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I'm trying to control the border of a grid cell but the bottom won't show regardless of the grid's itemHeight property. Any idea how to fix this?

I'm using the following style -
Code: CSS
color:#00008B;background-color:#FFFFFF;font-weight:normal;text-align:center;vertical-align:middle;border-color:#FF00FF #FF00FF #FF8C00 #FF8C00;border-style: solid;border-width:2px;


And this is the result -
eo_support
Posted: Tuesday, May 24, 2016 1:24:47 PM
Rank: Administration
Groups: Administration

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

Please try to use a DIV inside the Grid cell and apply the border on that DIV instead. The Grid cells are intentionally overlapped together so that the top border of the cell below overlaps the bottom border of the cell above. This is needed to create border line similar to a table's border-collapse option. As a result, border bottom won't work properly on the Grid cell.

Thanks!
Joan Darling
Posted: Tuesday, May 31, 2016 2:40:12 PM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
Can you point me to an example of how to add a div to the cell?
eo_support
Posted: Tuesday, May 31, 2016 4:07:39 PM
Rank: Administration
Groups: Administration

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

You can either use GridColumn.DataFormat to include wrapper HTML or set the cell value to raw HTML value. For example, if your data value is "abc", you can set DataFormat to "<div>{0}</div>" to include extra DIV for the cell, or set cell value to "<div>abc</div>". Both method will display "<div>abc</div>" in the cell when the cell is rendered.

Thanks!
Joan Darling
Posted: Wednesday, June 1, 2016 9:41:05 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I've added DataFormat="<div>{0}</div>" to the column but it didn't affect the display. Should the StyleField value be applied to the DIV or do I need to remove the StyleField and apply the style to the DIV?
eo_support
Posted: Wednesday, June 1, 2016 10:45:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
It won't change anything just because you added a DIV tag. You will need to add whatever style you want to add onto that DIV tag. That's the whole point of adding a DIV (or whatever other elements you want to add), so that you can apply styles to it yourself.


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.