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

[Solved] Blank Collapse/Expand image

4 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
cds_user
Top achievements
Rank 1
cds_user asked on 07 Oct 2009, 06:45 PM
I needed to create a custom header back color for my RadGrid. I tried setting the HeaderStyle to my desired color but only portion of the header would display the color. Therefore I created a Custom Skin and now the entire background header is set to this color. The problem now is that my Collapse/Expand images are showing blank sprite buttons. Prior to me changing to a custom skin my Collapse/Expand images were clearly shown or displayed. I have tried setting the CollapseImageUrl and ExpandImageUrl to the custom skin but this has not helped, any help on this issue would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Thomas Salt
Top achievements
Rank 1
answered on 07 Oct 2009, 08:31 PM
have you tried explicitly setting the mastertableview/expandcollapsecolumn-collapseimageurl?  That may work.  I know it's not the best way to do it, but check it out.
0
cds_user
Top achievements
Rank 1
answered on 07 Oct 2009, 08:39 PM
Yes, I tried this but it did not work.
0
Dimo
Telerik team
answered on 09 Oct 2009, 12:57 PM
Hi Michael,

Please make sure you have the following styles in your custom RadGrid skin:

.RadGrid_SkinName .rgExpand,
.RadGrid_SkinName .rgCollapse
{
    width:16px;
    height:16px;
    border:0;
    margin:0;
    padding:0;
    background-color:transparent;
    background-image:url('......your-sprite-image-here.........');
    background-repeat:no-repeat;
    vertical-align:middle;
    font-size:1px;
    cursor:pointer;
}


.RadGrid_SkinName .rgGroupHeader .rgExpand
{
    background-position:........ correct position here ........ ;
}

.RadGrid_SkinName .rgGroupHeader .rgCollapse
{
    background-position:........ correct position here ........ ;
}


By the way, ExpandImageUrl and CollapseImageUrl can be set only at runtime, e.g. in the ColumnCreated event handler.


Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
cds_user
Top achievements
Rank 1
answered on 09 Oct 2009, 03:57 PM
Thanks, it working now.
Tags
Grid
Asked by
cds_user
Top achievements
Rank 1
Answers by
Thomas Salt
Top achievements
Rank 1
cds_user
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or