This is a migrated thread and some comments may be shown as answers.

Expand / Collapse IE Issue

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin Schneider
Top achievements
Rank 1
Kevin Schneider asked on 01 Oct 2008, 09:07 PM
Hi,

I have a RadGrid which is allowing client-side collapsing/expanding along with client-side row selecting.  I am using the Gray theme and have the grid set up as a self referencing hierarchical grid.

With that said my problem is that not all my rows need the collapse/expand icon to appear and your default functionality is to hide the icon.  The problem is that when a cell is empty in IE it doesn't draw border lines around it so the end result is funny looking if I select that table row.

The CSS you have set by default with the Gray theme has the border color set as white and if its a selected row the border is then black.  However, the empty cell will still just display a white border so you end up with a very inconsistent look.

Is there any way to tell the grid to put in an &nbsp instead of nothing into this cell when the image is not required so that the top/bottom border correctly displays around the cell?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 06 Oct 2008, 12:41 PM
Hello Kevin,

I guess that by "your default functionality is to hide the icon" you are referring to our online example, in which the expand/collapse images are hidden at runtime:

RadGrid Self-Referencing Hierarchy Example

In order to keep the borders of the GridExpandColumn cells, you can use the following


(cell.Controls[0] as WebControl).Style["visibility"] = "hidden";


instead of


if (nestedView.Items.Count == 0)
{
    TableCell cell = nestedView.ParentItem["ExpandColumn"];
    cell.Controls[0].Visible = false;
    nestedViewItem.Visible = false;
}


All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Kevin Schneider
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or